* [PATCH 2/3] btrfs: fix compile warning of uninitialized value
@ 2016-01-29 13:36 Kinglong Mee
0 siblings, 0 replies; only message in thread
From: Kinglong Mee @ 2016-01-29 13:36 UTC (permalink / raw)
To: Chris Mason, linux-btrfs; +Cc: miaoxie, kinglongmee
CC [M] fs/btrfs/extent-tree.o
fs/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 <kinglongmee@gmail.com>
---
fs/btrfs/extent-tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index e2287c7..f24e4c3 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -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);
--
2.5.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-29 13:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-29 13:36 [PATCH 2/3] btrfs: fix compile warning of uninitialized value Kinglong Mee
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.