From: Josef Bacik <josef@redhat.com>
To: Daniel J Blueman <daniel@quora.org>
Cc: linux-btrfs@vger.kernel.org, Chris Mason <chris.mason@oracle.com>,
Josef Bacik <josef@redhat.com>
Subject: Re: [PATCH] Prevent root_list corruption
Date: Tue, 24 Apr 2012 09:17:59 -0400 [thread overview]
Message-ID: <20120424131758.GC1940@localhost.localdomain> (raw)
In-Reply-To: <1335244300-6599-1-git-send-email-daniel@quora.org>
On Tue, Apr 24, 2012 at 01:11:40PM +0800, Daniel J Blueman wrote:
> I was seeing root_list corruption on unmount during fs resize in 3.4-rc4; add
> correct locking to address this.
>
> Signed-off-by: Daniel J Blueman <daniel@quora.org>
> ---
> fs/btrfs/relocation.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
> index 017281d..5a105a0 100644
> --- a/fs/btrfs/relocation.c
> +++ b/fs/btrfs/relocation.c
> @@ -1279,7 +1279,9 @@ static int __update_reloc_root(struct btrfs_root *root, int del)
> if (rb_node)
> backref_tree_panic(rb_node, -EEXIST, node->bytenr);
> } else {
> + spin_lock(&root->fs_info->trans_lock);
> list_del_init(&root->root_list);
> + spin_unlock(&root->fs_info->trans_lock);
> kfree(node);
> }
> return 0;
> --
> 1.7.9.5
>
Reviewed-by: Josef Bacik <josef@redhat.com>
Thanks,
Josef
prev parent reply other threads:[~2012-04-24 13:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-24 5:11 [PATCH] Prevent root_list corruption Daniel J Blueman
2012-04-24 13:17 ` Josef Bacik [this message]
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=20120424131758.GC1940@localhost.localdomain \
--to=josef@redhat.com \
--cc=chris.mason@oracle.com \
--cc=daniel@quora.org \
--cc=linux-btrfs@vger.kernel.org \
/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).