提交 f068ebd1 编写于 作者: M Mathieu Malaterre 提交者: Jan Kara

ext2: Annotate implicit fall through in __ext2_truncate_blocks

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: NMathieu Malaterre <malat@debian.org>
Signed-off-by: NJan Kara <jack@suse.cz>
上级 032cdc39
...@@ -1239,6 +1239,7 @@ static void __ext2_truncate_blocks(struct inode *inode, loff_t offset) ...@@ -1239,6 +1239,7 @@ static void __ext2_truncate_blocks(struct inode *inode, loff_t offset)
mark_inode_dirty(inode); mark_inode_dirty(inode);
ext2_free_branches(inode, &nr, &nr+1, 1); ext2_free_branches(inode, &nr, &nr+1, 1);
} }
/* fall through */
case EXT2_IND_BLOCK: case EXT2_IND_BLOCK:
nr = i_data[EXT2_DIND_BLOCK]; nr = i_data[EXT2_DIND_BLOCK];
if (nr) { if (nr) {
...@@ -1246,6 +1247,7 @@ static void __ext2_truncate_blocks(struct inode *inode, loff_t offset) ...@@ -1246,6 +1247,7 @@ static void __ext2_truncate_blocks(struct inode *inode, loff_t offset)
mark_inode_dirty(inode); mark_inode_dirty(inode);
ext2_free_branches(inode, &nr, &nr+1, 2); ext2_free_branches(inode, &nr, &nr+1, 2);
} }
/* fall through */
case EXT2_DIND_BLOCK: case EXT2_DIND_BLOCK:
nr = i_data[EXT2_TIND_BLOCK]; nr = i_data[EXT2_TIND_BLOCK];
if (nr) { if (nr) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册