From: Kinglong Mee <kinglongmee@gmail.com>
To: Chris Mason <clm@fb.com>, linux-btrfs@vger.kernel.org
Cc: miaoxie@huawei.com, kinglongmee@gmail.com
Subject: [PATCH 2/3] btrfs: fix compile warning of uninitialized value
Date: Fri, 29 Jan 2016 21:36:21 +0800 [thread overview]
Message-ID: <56AB6AD5.2010403@gmail.com> (raw)
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
reply other threads:[~2016-01-29 13:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56AB6AD5.2010403@gmail.com \
--to=kinglongmee@gmail.com \
--cc=clm@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=miaoxie@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).