diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-10-30 14:46:20 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2020-11-06 22:52:36 -0500 |
commit | e121bd48b9eb8e3b9104d3d5d08fdf88e9ca0f97 (patch) | |
tree | ef0435d55fef1f399dabd3e54ff1b8ccacea13e2 /lib/bitmap.c | |
parent | a0650046d31d3ca92e7fb41ae5c667ed9250a2fc (diff) |
ext4: silence an uninitialized variable warning
Smatch complains that "i" can be uninitialized if we don't enter the
loop. I don't know if it's possible but we may as well silence this
warning.
[ Initialize i to sb->s_blocksize instead of 0. The only way the for
loop could be skipped entirely is the in-memory data structures, in
particular the bh->b_data for the on-disk superblock has gotten
corrupted enough that calculated value of group is >= to
ext4_get_groups_count(sb). In that case, we want to exit
immediately without allocating a block. -- TYT ]
Fixes: 8016e29f4362 ("ext4: fast commit recovery path")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201030114620.GB3251003@mwanda
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Diffstat (limited to 'lib/bitmap.c')
0 files changed, 0 insertions, 0 deletions