aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 7a22f2e6ec47..ed1e25d72483 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3407,7 +3407,10 @@ struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans,
3407 btrfs_set_header_generation(buf, trans->transid); 3407 btrfs_set_header_generation(buf, trans->transid);
3408 btrfs_tree_lock(buf); 3408 btrfs_tree_lock(buf);
3409 clean_tree_block(trans, root, buf); 3409 clean_tree_block(trans, root, buf);
3410
3411 btrfs_set_lock_blocking(buf);
3410 btrfs_set_buffer_uptodate(buf); 3412 btrfs_set_buffer_uptodate(buf);
3413
3411 if (root->root_key.objectid == BTRFS_TREE_LOG_OBJECTID) { 3414 if (root->root_key.objectid == BTRFS_TREE_LOG_OBJECTID) {
3412 set_extent_dirty(&root->dirty_log_pages, buf->start, 3415 set_extent_dirty(&root->dirty_log_pages, buf->start,
3413 buf->start + buf->len - 1, GFP_NOFS); 3416 buf->start + buf->len - 1, GFP_NOFS);
@@ -3416,6 +3419,7 @@ struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans,
3416 buf->start + buf->len - 1, GFP_NOFS); 3419 buf->start + buf->len - 1, GFP_NOFS);
3417 } 3420 }
3418 trans->blocks_used++; 3421 trans->blocks_used++;
3422 /* this returns a buffer locked for blocking */
3419 return buf; 3423 return buf;
3420} 3424}
3421 3425
@@ -3752,6 +3756,7 @@ static noinline int walk_down_subtree(struct btrfs_trans_handle *trans,
3752 3756
3753 next = read_tree_block(root, bytenr, blocksize, ptr_gen); 3757 next = read_tree_block(root, bytenr, blocksize, ptr_gen);
3754 btrfs_tree_lock(next); 3758 btrfs_tree_lock(next);
3759 btrfs_set_lock_blocking(next);
3755 3760
3756 ret = btrfs_lookup_extent_ref(trans, root, bytenr, blocksize, 3761 ret = btrfs_lookup_extent_ref(trans, root, bytenr, blocksize,
3757 &refs); 3762 &refs);