Skip to content

Commit 70d7ced

Browse files
Shijie Luotytso
authored andcommitted
ext4: change to use fallthrough macro
Change to use fallthrough macro in switch case. Signed-off-by: Shijie Luo <[email protected]> Reviewed-by: Ritesh Harjani <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent 2fe34d2 commit 70d7ced

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

fs/ext4/hash.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ static int __ext4fs_dirhash(const char *name, int len,
233233
break;
234234
case DX_HASH_HALF_MD4_UNSIGNED:
235235
str2hashbuf = str2hashbuf_unsigned;
236-
/* fall through */
236+
fallthrough;
237237
case DX_HASH_HALF_MD4:
238238
p = name;
239239
while (len > 0) {
@@ -247,7 +247,7 @@ static int __ext4fs_dirhash(const char *name, int len,
247247
break;
248248
case DX_HASH_TEA_UNSIGNED:
249249
str2hashbuf = str2hashbuf_unsigned;
250-
/* fall through */
250+
fallthrough;
251251
case DX_HASH_TEA:
252252
p = name;
253253
while (len > 0) {

fs/ext4/indirect.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,21 +1180,21 @@ void ext4_ind_truncate(handle_t *handle, struct inode *inode)
11801180
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
11811181
i_data[EXT4_IND_BLOCK] = 0;
11821182
}
1183-
/* fall through */
1183+
fallthrough;
11841184
case EXT4_IND_BLOCK:
11851185
nr = i_data[EXT4_DIND_BLOCK];
11861186
if (nr) {
11871187
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
11881188
i_data[EXT4_DIND_BLOCK] = 0;
11891189
}
1190-
/* fall through */
1190+
fallthrough;
11911191
case EXT4_DIND_BLOCK:
11921192
nr = i_data[EXT4_TIND_BLOCK];
11931193
if (nr) {
11941194
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
11951195
i_data[EXT4_TIND_BLOCK] = 0;
11961196
}
1197-
/* fall through */
1197+
fallthrough;
11981198
case EXT4_TIND_BLOCK:
11991199
;
12001200
}
@@ -1434,7 +1434,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
14341434
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
14351435
i_data[EXT4_IND_BLOCK] = 0;
14361436
}
1437-
/* fall through */
1437+
fallthrough;
14381438
case EXT4_IND_BLOCK:
14391439
if (++n >= n2)
14401440
break;
@@ -1443,7 +1443,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
14431443
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
14441444
i_data[EXT4_DIND_BLOCK] = 0;
14451445
}
1446-
/* fall through */
1446+
fallthrough;
14471447
case EXT4_DIND_BLOCK:
14481448
if (++n >= n2)
14491449
break;
@@ -1452,7 +1452,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
14521452
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
14531453
i_data[EXT4_TIND_BLOCK] = 0;
14541454
}
1455-
/* fall through */
1455+
fallthrough;
14561456
case EXT4_TIND_BLOCK:
14571457
;
14581458
}

fs/ext4/readpage.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,15 @@ static void bio_post_read_processing(struct bio_post_read_ctx *ctx)
140140
return;
141141
}
142142
ctx->cur_step++;
143-
/* fall-through */
143+
fallthrough;
144144
case STEP_VERITY:
145145
if (ctx->enabled_steps & (1 << STEP_VERITY)) {
146146
INIT_WORK(&ctx->work, verity_work);
147147
fsverity_enqueue_verify_work(&ctx->work);
148148
return;
149149
}
150150
ctx->cur_step++;
151-
/* fall-through */
151+
fallthrough;
152152
default:
153153
__read_end_io(ctx->bio);
154154
}

0 commit comments

Comments
 (0)