Commit 793bc518 authored by Mathieu Malaterre's avatar Mathieu Malaterre Committed by Theodore Ts'o

ext4: annotate more implicit fall throughs

There is a plan to build the kernel with -Wimplicit-fallthrough and
these places in the code produced warnings (W=1). Fix them up.

This commit remove the following warnings:

  fs/ext4/indirect.c:1182:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
  fs/ext4/indirect.c:1188:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
  fs/ext4/indirect.c:1432:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
  fs/ext4/indirect.c:1440:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
Signed-off-by: default avatarMathieu Malaterre <malat@debian.org>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Reviewed-by: default avatarAndreas Dilger <adilger@dilger.ca>
parent 034f891a
...@@ -1183,18 +1183,21 @@ void ext4_ind_truncate(handle_t *handle, struct inode *inode) ...@@ -1183,18 +1183,21 @@ void ext4_ind_truncate(handle_t *handle, struct inode *inode)
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
i_data[EXT4_IND_BLOCK] = 0; i_data[EXT4_IND_BLOCK] = 0;
} }
/* fall through */
case EXT4_IND_BLOCK: case EXT4_IND_BLOCK:
nr = i_data[EXT4_DIND_BLOCK]; nr = i_data[EXT4_DIND_BLOCK];
if (nr) { if (nr) {
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
i_data[EXT4_DIND_BLOCK] = 0; i_data[EXT4_DIND_BLOCK] = 0;
} }
/* fall through */
case EXT4_DIND_BLOCK: case EXT4_DIND_BLOCK:
nr = i_data[EXT4_TIND_BLOCK]; nr = i_data[EXT4_TIND_BLOCK];
if (nr) { if (nr) {
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
i_data[EXT4_TIND_BLOCK] = 0; i_data[EXT4_TIND_BLOCK] = 0;
} }
/* fall through */
case EXT4_TIND_BLOCK: case EXT4_TIND_BLOCK:
; ;
} }
...@@ -1433,6 +1436,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode, ...@@ -1433,6 +1436,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
i_data[EXT4_IND_BLOCK] = 0; i_data[EXT4_IND_BLOCK] = 0;
} }
/* fall through */
case EXT4_IND_BLOCK: case EXT4_IND_BLOCK:
if (++n >= n2) if (++n >= n2)
return 0; return 0;
...@@ -1441,6 +1445,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode, ...@@ -1441,6 +1445,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
i_data[EXT4_DIND_BLOCK] = 0; i_data[EXT4_DIND_BLOCK] = 0;
} }
/* fall through */
case EXT4_DIND_BLOCK: case EXT4_DIND_BLOCK:
if (++n >= n2) if (++n >= n2)
return 0; return 0;
...@@ -1449,6 +1454,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode, ...@@ -1449,6 +1454,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
i_data[EXT4_TIND_BLOCK] = 0; i_data[EXT4_TIND_BLOCK] = 0;
} }
/* fall through */
case EXT4_TIND_BLOCK: case EXT4_TIND_BLOCK:
; ;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment