summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathieu Malaterre <malat@debian.org>2019-02-21 10:51:27 -0500
committerTheodore Ts'o <tytso@mit.edu>2019-02-21 10:51:27 -0500
commit793bc5181b14bf7cdfefe9d2fe8fc4a8114b78f9 (patch)
tree48c5e431f7e95a37cced816fa83f9e87f8e9ae54
parent034f891a844bba3665c2313bcbf61f335dd422e8 (diff)
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: Mathieu Malaterre <malat@debian.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Andreas Dilger <adilger@dilger.ca>
-rw-r--r--fs/ext4/indirect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ext4/indirect.c b/fs/ext4/indirect.c
index bf7fa1507e81..c2225f0d31b5 100644
--- a/fs/ext4/indirect.c
+++ b/fs/ext4/indirect.c
@@ -1183,18 +1183,21 @@ do_indirects:
1183 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); 1183 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
1184 i_data[EXT4_IND_BLOCK] = 0; 1184 i_data[EXT4_IND_BLOCK] = 0;
1185 } 1185 }
1186 /* fall through */
1186 case EXT4_IND_BLOCK: 1187 case EXT4_IND_BLOCK:
1187 nr = i_data[EXT4_DIND_BLOCK]; 1188 nr = i_data[EXT4_DIND_BLOCK];
1188 if (nr) { 1189 if (nr) {
1189 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); 1190 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
1190 i_data[EXT4_DIND_BLOCK] = 0; 1191 i_data[EXT4_DIND_BLOCK] = 0;
1191 } 1192 }
1193 /* fall through */
1192 case EXT4_DIND_BLOCK: 1194 case EXT4_DIND_BLOCK:
1193 nr = i_data[EXT4_TIND_BLOCK]; 1195 nr = i_data[EXT4_TIND_BLOCK];
1194 if (nr) { 1196 if (nr) {
1195 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); 1197 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
1196 i_data[EXT4_TIND_BLOCK] = 0; 1198 i_data[EXT4_TIND_BLOCK] = 0;
1197 } 1199 }
1200 /* fall through */
1198 case EXT4_TIND_BLOCK: 1201 case EXT4_TIND_BLOCK:
1199 ; 1202 ;
1200 } 1203 }
@@ -1433,6 +1436,7 @@ do_indirects:
1433 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1); 1436 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
1434 i_data[EXT4_IND_BLOCK] = 0; 1437 i_data[EXT4_IND_BLOCK] = 0;
1435 } 1438 }
1439 /* fall through */
1436 case EXT4_IND_BLOCK: 1440 case EXT4_IND_BLOCK:
1437 if (++n >= n2) 1441 if (++n >= n2)
1438 return 0; 1442 return 0;
@@ -1441,6 +1445,7 @@ do_indirects:
1441 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2); 1445 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
1442 i_data[EXT4_DIND_BLOCK] = 0; 1446 i_data[EXT4_DIND_BLOCK] = 0;
1443 } 1447 }
1448 /* fall through */
1444 case EXT4_DIND_BLOCK: 1449 case EXT4_DIND_BLOCK:
1445 if (++n >= n2) 1450 if (++n >= n2)
1446 return 0; 1451 return 0;
@@ -1449,6 +1454,7 @@ do_indirects:
1449 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3); 1454 ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
1450 i_data[EXT4_TIND_BLOCK] = 0; 1455 i_data[EXT4_TIND_BLOCK] = 0;
1451 } 1456 }
1457 /* fall through */
1452 case EXT4_TIND_BLOCK: 1458 case EXT4_TIND_BLOCK:
1453 ; 1459 ;
1454 } 1460 }