Skip to content

Commit 793bc51

Browse files
malaterretytso
authored andcommitted
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>
1 parent 034f891 commit 793bc51

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎fs/ext4/indirect.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,18 +1183,21 @@ void ext4_ind_truncate(handle_t *handle, struct inode *inode)
11831183
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
11841184
i_data[EXT4_IND_BLOCK] = 0;
11851185
}
1186+
/* fall through */
11861187
case EXT4_IND_BLOCK:
11871188
nr = i_data[EXT4_DIND_BLOCK];
11881189
if (nr) {
11891190
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
11901191
i_data[EXT4_DIND_BLOCK] = 0;
11911192
}
1193+
/* fall through */
11921194
case EXT4_DIND_BLOCK:
11931195
nr = i_data[EXT4_TIND_BLOCK];
11941196
if (nr) {
11951197
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
11961198
i_data[EXT4_TIND_BLOCK] = 0;
11971199
}
1200+
/* fall through */
11981201
case EXT4_TIND_BLOCK:
11991202
;
12001203
}
@@ -1433,6 +1436,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
14331436
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 1);
14341437
i_data[EXT4_IND_BLOCK] = 0;
14351438
}
1439+
/* fall through */
14361440
case EXT4_IND_BLOCK:
14371441
if (++n >= n2)
14381442
return 0;
@@ -1441,6 +1445,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
14411445
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 2);
14421446
i_data[EXT4_DIND_BLOCK] = 0;
14431447
}
1448+
/* fall through */
14441449
case EXT4_DIND_BLOCK:
14451450
if (++n >= n2)
14461451
return 0;
@@ -1449,6 +1454,7 @@ int ext4_ind_remove_space(handle_t *handle, struct inode *inode,
14491454
ext4_free_branches(handle, inode, NULL, &nr, &nr+1, 3);
14501455
i_data[EXT4_TIND_BLOCK] = 0;
14511456
}
1457+
/* fall through */
14521458
case EXT4_TIND_BLOCK:
14531459
;
14541460
}

0 commit comments

Comments
 (0)