diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-11-05 16:45:40 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-01-03 15:09:48 +0100 |
commit | 3478c732520a01561bb49f8c5d469f02419fd922 (patch) | |
tree | d51c87c19be00d0b4238a2b68e07cb4af0f4037b | |
parent | 826582cabc22e741ef3d420fd53b83de988b5647 (diff) | |
download | lwn-3478c732520a01561bb49f8c5d469f02419fd922.tar.gz lwn-3478c732520a01561bb49f8c5d469f02419fd922.zip |
btrfs: remove unnecessary extent root check in btrfs_defrag_leaves
We only defrag leaves on roots that have SHAREABLE set, so we don't need
to check if we're the extent root as it doesn't have SHAREABLE set.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/tree-defrag.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/btrfs/tree-defrag.c b/fs/btrfs/tree-defrag.c index 7c45d960b53c..b6cf39f4e7e4 100644 --- a/fs/btrfs/tree-defrag.c +++ b/fs/btrfs/tree-defrag.c @@ -27,14 +27,6 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans, int next_key_ret = 0; u64 last_ret = 0; - if (root->fs_info->extent_root == root) { - /* - * there's recursion here right now in the tree locking, - * we can't defrag the extent root without deadlock - */ - goto out; - } - if (!test_bit(BTRFS_ROOT_SHAREABLE, &root->state)) goto out; |