Re: [PATCH] Prevent root_list corruption

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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@xxxxxxxxxx>

Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux