diff options
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 1306487c82cf..5590af92094b 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -1542,6 +1542,7 @@ again: | |||
1542 | ret = 0; | 1542 | ret = 0; |
1543 | } | 1543 | } |
1544 | if (ret) { | 1544 | if (ret) { |
1545 | key.objectid = bytenr; | ||
1545 | key.type = BTRFS_EXTENT_ITEM_KEY; | 1546 | key.type = BTRFS_EXTENT_ITEM_KEY; |
1546 | key.offset = num_bytes; | 1547 | key.offset = num_bytes; |
1547 | btrfs_release_path(path); | 1548 | btrfs_release_path(path); |
@@ -3542,11 +3543,13 @@ static u64 btrfs_reduce_alloc_profile(struct btrfs_root *root, u64 flags) | |||
3542 | return extended_to_chunk(flags | tmp); | 3543 | return extended_to_chunk(flags | tmp); |
3543 | } | 3544 | } |
3544 | 3545 | ||
3545 | static u64 get_alloc_profile(struct btrfs_root *root, u64 flags) | 3546 | static u64 get_alloc_profile(struct btrfs_root *root, u64 orig_flags) |
3546 | { | 3547 | { |
3547 | unsigned seq; | 3548 | unsigned seq; |
3549 | u64 flags; | ||
3548 | 3550 | ||
3549 | do { | 3551 | do { |
3552 | flags = orig_flags; | ||
3550 | seq = read_seqbegin(&root->fs_info->profiles_lock); | 3553 | seq = read_seqbegin(&root->fs_info->profiles_lock); |
3551 | 3554 | ||
3552 | if (flags & BTRFS_BLOCK_GROUP_DATA) | 3555 | if (flags & BTRFS_BLOCK_GROUP_DATA) |
@@ -5719,6 +5722,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans, | |||
5719 | 5722 | ||
5720 | if (ret > 0 && skinny_metadata) { | 5723 | if (ret > 0 && skinny_metadata) { |
5721 | skinny_metadata = false; | 5724 | skinny_metadata = false; |
5725 | key.objectid = bytenr; | ||
5722 | key.type = BTRFS_EXTENT_ITEM_KEY; | 5726 | key.type = BTRFS_EXTENT_ITEM_KEY; |
5723 | key.offset = num_bytes; | 5727 | key.offset = num_bytes; |
5724 | btrfs_release_path(path); | 5728 | btrfs_release_path(path); |