From: chandan Date: Thu, 15 Jan 2015 06:52:03 +0000 (+0530) Subject: Btrfs: insert_new_root: Fix lock type of the extent buffer. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=95449a1626fb6b643b576b9fbafed02793627577;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Btrfs: insert_new_root: Fix lock type of the extent buffer. btrfs_alloc_tree_block() returns an extent buffer on which a blocked lock has been taken. Hence assign the appropriate value to path->locks[level]. Signed-off-by: Chandan Rajendra Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index fdd8fb4c6075..993642199326 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -3380,7 +3380,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans, add_root_to_dirty_list(root); extent_buffer_get(c); path->nodes[level] = c; - path->locks[level] = BTRFS_WRITE_LOCK; + path->locks[level] = BTRFS_WRITE_LOCK_BLOCKING; path->slots[level] = 0; return 0; }