Skip to content

Commit

Permalink
ext2: Annotate implicit fall through in __ext2_truncate_blocks
Browse files Browse the repository at this point in the history
There is a plan to build the kernel with -Wimplicit-fallthrough and
these places in the code produced warnings (W=1).

This commit removes the following warnings:

  fs/ext2/inode.c:1237:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
  fs/ext2/inode.c:1244:7: warning: this statement may fall through [-Wimplicit-fallthrough=]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Jan Kara <jack@suse.cz>
  • Loading branch information
Mathieu Malaterre authored and Jan Kara committed Jan 28, 2019
1 parent 032cdc3 commit f068ebd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/ext2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1239,13 +1239,15 @@ static void __ext2_truncate_blocks(struct inode *inode, loff_t offset)
mark_inode_dirty(inode);
ext2_free_branches(inode, &nr, &nr+1, 1);
}
/* fall through */
case EXT2_IND_BLOCK:
nr = i_data[EXT2_DIND_BLOCK];
if (nr) {
i_data[EXT2_DIND_BLOCK] = 0;
mark_inode_dirty(inode);
ext2_free_branches(inode, &nr, &nr+1, 2);
}
/* fall through */
case EXT2_DIND_BLOCK:
nr = i_data[EXT2_TIND_BLOCK];
if (nr) {
Expand Down

0 comments on commit f068ebd

Please sign in to comment.