Skip to content

Commit 95449a1

Browse files
chandanmasoncl
authored andcommitted
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>
1 parent 78f55e5 commit 95449a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/ctree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3380,7 +3380,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,
33803380
add_root_to_dirty_list(root);
33813381
extent_buffer_get(c);
33823382
path->nodes[level] = c;
3383-
path->locks[level] = BTRFS_WRITE_LOCK;
3383+
path->locks[level] = BTRFS_WRITE_LOCK_BLOCKING;
33843384
path->slots[level] = 0;
33853385
return 0;
33863386
}

0 commit comments

Comments
 (0)