Message ID | 87302b559838af285024d47b3b738ef36ad0ebe4.1671221596.git.josef@toxicpanda.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fixup uninitialized warnings and enable extra checks | expand |
On 2022/12/17 04:15, Josef Bacik wrote: > reclaim isn't set in the alloc case, however we only care about reclaim > in the !alloc case. This isn't an actual problem, however > -Wmaybe-uninitialized will complain, so initialize reclaim to quiet the > compiler. Reviewed-by: Qu Wenruo <wqu@suse.com> Thanks, Qu > > Signed-off-by: Josef Bacik <josef@toxicpanda.com> > --- > fs/btrfs/block-group.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c > index 708d843daa72..e90800388a41 100644 > --- a/fs/btrfs/block-group.c > +++ b/fs/btrfs/block-group.c > @@ -3330,7 +3330,7 @@ int btrfs_update_block_group(struct btrfs_trans_handle *trans, > spin_unlock(&info->delalloc_root_lock); > > while (total) { > - bool reclaim; > + bool reclaim = false; > > cache = btrfs_lookup_block_group(info, bytenr); > if (!cache) {
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index 708d843daa72..e90800388a41 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -3330,7 +3330,7 @@ int btrfs_update_block_group(struct btrfs_trans_handle *trans, spin_unlock(&info->delalloc_root_lock); while (total) { - bool reclaim; + bool reclaim = false; cache = btrfs_lookup_block_group(info, bytenr); if (!cache) {
reclaim isn't set in the alloc case, however we only care about reclaim in the !alloc case. This isn't an actual problem, however -Wmaybe-uninitialized will complain, so initialize reclaim to quiet the compiler. Signed-off-by: Josef Bacik <josef@toxicpanda.com> --- fs/btrfs/block-group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)