diff options
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index efc604eea0b0..be9630df506c 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -157,8 +157,6 @@ static int finish_current_insert(struct btrfs_trans_handle *trans, struct | |||
157 | struct btrfs_fs_info *info = extent_root->fs_info; | 157 | struct btrfs_fs_info *info = extent_root->fs_info; |
158 | 158 | ||
159 | btrfs_set_extent_refs(&extent_item, 1); | 159 | btrfs_set_extent_refs(&extent_item, 1); |
160 | btrfs_set_extent_owner(&extent_item, | ||
161 | btrfs_header_parentid(btrfs_buffer_header(extent_root->node))); | ||
162 | ins.offset = 1; | 160 | ins.offset = 1; |
163 | ins.flags = 0; | 161 | ins.flags = 0; |
164 | btrfs_set_key_type(&ins, BTRFS_EXTENT_ITEM_KEY); | 162 | btrfs_set_key_type(&ins, BTRFS_EXTENT_ITEM_KEY); |
@@ -457,7 +455,7 @@ error: | |||
457 | */ | 455 | */ |
458 | int btrfs_alloc_extent(struct btrfs_trans_handle *trans, struct btrfs_root | 456 | int btrfs_alloc_extent(struct btrfs_trans_handle *trans, struct btrfs_root |
459 | *root, u64 num_blocks, u64 search_start, u64 | 457 | *root, u64 num_blocks, u64 search_start, u64 |
460 | search_end, u64 owner, struct btrfs_key *ins) | 458 | search_end, struct btrfs_key *ins) |
461 | { | 459 | { |
462 | int ret; | 460 | int ret; |
463 | int pending_ret; | 461 | int pending_ret; |
@@ -467,7 +465,6 @@ int btrfs_alloc_extent(struct btrfs_trans_handle *trans, struct btrfs_root | |||
467 | struct btrfs_extent_item extent_item; | 465 | struct btrfs_extent_item extent_item; |
468 | 466 | ||
469 | btrfs_set_extent_refs(&extent_item, 1); | 467 | btrfs_set_extent_refs(&extent_item, 1); |
470 | btrfs_set_extent_owner(&extent_item, owner); | ||
471 | 468 | ||
472 | if (root == extent_root) { | 469 | if (root == extent_root) { |
473 | BUG_ON(extent_root->fs_info->current_insert.offset == 0); | 470 | BUG_ON(extent_root->fs_info->current_insert.offset == 0); |
@@ -510,8 +507,7 @@ struct buffer_head *btrfs_alloc_free_block(struct btrfs_trans_handle *trans, | |||
510 | int ret; | 507 | int ret; |
511 | struct buffer_head *buf; | 508 | struct buffer_head *buf; |
512 | 509 | ||
513 | ret = btrfs_alloc_extent(trans, root, 1, 0, (unsigned long)-1, | 510 | ret = btrfs_alloc_extent(trans, root, 1, 0, (unsigned long)-1, &ins); |
514 | btrfs_header_parentid(btrfs_buffer_header(root->node)), &ins); | ||
515 | if (ret) { | 511 | if (ret) { |
516 | BUG(); | 512 | BUG(); |
517 | return NULL; | 513 | return NULL; |