aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorchandan <chandan@linux.vnet.ibm.com>2015-01-15 01:52:03 -0500
committerChris Mason <clm@fb.com>2015-01-22 08:42:23 -0500
commit95449a1626fb6b643b576b9fbafed02793627577 (patch)
tree6df4dfab0a5e36cae8408773c306189ed9ac5bb0 /fs
parent78f55e5e1fa9f684705325667d455a957f43ad66 (diff)
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 <chandan@linux.vnet.ibm.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/ctree.c2
1 files changed, 1 insertions, 1 deletions
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,
3380 add_root_to_dirty_list(root); 3380 add_root_to_dirty_list(root);
3381 extent_buffer_get(c); 3381 extent_buffer_get(c);
3382 path->nodes[level] = c; 3382 path->nodes[level] = c;
3383 path->locks[level] = BTRFS_WRITE_LOCK; 3383 path->locks[level] = BTRFS_WRITE_LOCK_BLOCKING;
3384 path->slots[level] = 0; 3384 path->slots[level] = 0;
3385 return 0; 3385 return 0;
3386} 3386}