Skip to content

Commit

Permalink
ext4: change to use fallthrough macro
Browse files Browse the repository at this point in the history
Change to use fallthrough macro in switch case.

Signed-off-by: Shijie Luo <luoshijie1@huawei.com>
Reviewed-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/20200810114435.24182-1-luoshijie1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Shijie Luo authored and Theodore Ts'o committed Aug 18, 2020
1 parent 2fe34d2 commit 70d7ced
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions fs/ext4/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static int __ext4fs_dirhash(const char *name, int len,
break;
case DX_HASH_HALF_MD4_UNSIGNED:
str2hashbuf = str2hashbuf_unsigned;
/* fall through */
fallthrough;
case DX_HASH_HALF_MD4:
p = name;
while (len > 0) {
Expand All @@ -247,7 +247,7 @@ static int __ext4fs_dirhash(const char *name, int len,
break;
case DX_HASH_TEA_UNSIGNED:
str2hashbuf = str2hashbuf_unsigned;
/* fall through */
fallthrough;
case DX_HASH_TEA:
p = name;
while (len > 0) {
Expand Down
12 changes: 6 additions & 6 deletions fs/ext4/indirect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,21 +1180,21 @@ void ext4_ind_truncate(handle_t *handle, struct inode *inode)
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
i_data[EXT4_IND_BLOCK] = 0;
}
/* fall through */
fallthrough;
case EXT4_IND_BLOCK:
nr = i_data[EXT4_DIND_BLOCK];
if (nr) {
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
i_data[EXT4_DIND_BLOCK] = 0;
}
/* fall through */
fallthrough;
case EXT4_DIND_BLOCK:
nr = i_data[EXT4_TIND_BLOCK];
if (nr) {
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
i_data[EXT4_TIND_BLOCK] = 0;
}
/* fall through */
fallthrough;
case EXT4_TIND_BLOCK:
;
}
Expand Down Expand Up @@ -1434,7 +1434,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
i_data[EXT4_IND_BLOCK] = 0;
}
/* fall through */
fallthrough;
case EXT4_IND_BLOCK:
if (++n >= n2)
break;
Expand All @@ -1443,7 +1443,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
i_data[EXT4_DIND_BLOCK] = 0;
}
/* fall through */
fallthrough;
case EXT4_DIND_BLOCK:
if (++n >= n2)
break;
Expand All @@ -1452,7 +1452,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
i_data[EXT4_TIND_BLOCK] = 0;
}
/* fall through */
fallthrough;
case EXT4_TIND_BLOCK:
;
}
Expand Down
4 changes: 2 additions & 2 deletions fs/ext4/readpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ static void bio_post_read_processing(struct bio_post_read_ctx *ctx)
return;
}
ctx->cur_step++;
/* fall-through */
fallthrough;
case STEP_VERITY:
if (ctx->enabled_steps & (1 << STEP_VERITY)) {
INIT_WORK(&ctx->work, verity_work);
fsverity_enqueue_verify_work(&ctx->work);
return;
}
ctx->cur_step++;
/* fall-through */
fallthrough;
default:
__read_end_io(ctx->bio);
}
Expand Down

0 comments on commit 70d7ced

Please sign in to comment.