btrfs: fix compile warning of uninitialized value
PATCH 2/3 btrfs: fix compile warning of uninitialized value
CC [M] fs/btrfs/extent-tree.ofs/btrfs/extent-tree.c: In function 'find_free_extent':fs/btrfs/extent-tree.c:7021:34: warning: 'used_bg' may be used uninitialized in this function [-Wmaybe-uninitialized]
struct btrfs_block_group_cache *used_bg;
^Fixes e570fd27f2 ("Btrfs: fix broken free space cache after the system crashed")
Signed-off-by Kinglong Mee <[email protected]>
--- fs/btrfs/extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/extent-tree.c +1 -1
@@ -7018,7 +7018,7 @@ btrfs_lock_cluster(struct btrfs_block_group_cache *block_group, struct btrfs_free_cluster *cluster, int delalloc) { -struct btrfs_block_group_cache *used_bg; +struct btrfs_block_group_cache *used_bg =NULL ;bool locked = false; again:spin_lock (&cluster->refill_lock);
Signature · 1 line
2.5.0