]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Btrfs: insert_new_root: Fix lock type of the extent buffer.
authorchandan <chandan@linux.vnet.ibm.com>
Thu, 15 Jan 2015 06:52:03 +0000 (12:22 +0530)
committerChris Mason <clm@fb.com>
Thu, 22 Jan 2015 13:42:23 +0000 (05:42 -0800)
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 <chandan@linux.vnet.ibm.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ctree.c

index fdd8fb4c6075650a874d30dd0fdfe17320ef38a3..993642199326a757f55c78dbc2722ecc2b409b60 100644 (file)
@@ -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;
 }