summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode-item.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2021-12-04 01:18:06 +0300
committerDavid Sterba <dsterba@suse.com>2022-01-07 16:18:24 +0300
commit275312a03c625a35c33440d3937804b17f894e4f (patch)
treeefa05d583bcae616e02bfdc787bfeb6528f270bb /fs/btrfs/inode-item.c
parent9a4a1429acbe0508095dbb2c54e9e8b78dfe52f0 (diff)
downloadlinux-275312a03c625a35c33440d3937804b17f894e4f.tar.xz
btrfs: remove free space cache inode check in btrfs_truncate_inode_items
We no longer have inode cache feature, so this check is extraneous as the only inode cache is in the tree_root, which is not marked as SHAREABLE. Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode-item.c')
-rw-r--r--fs/btrfs/inode-item.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/inode-item.c b/fs/btrfs/inode-item.c
index 604ace69574b..379baeccc7d6 100644
--- a/fs/btrfs/inode-item.c
+++ b/fs/btrfs/inode-item.c
@@ -477,12 +477,10 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans,
BUG_ON(new_size > 0 && min_type != BTRFS_EXTENT_DATA_KEY);
/*
- * For non-free space inodes and non-shareable roots, we want to back
- * off from time to time. This means all inodes in subvolume roots,
- * reloc roots, and data reloc roots.
+ * For shareable roots we want to back off from time to time, this turns
+ * out to be subvolume roots, reloc roots, and data reloc roots.
*/
- if (!btrfs_is_free_space_inode(inode) &&
- test_bit(BTRFS_ROOT_SHAREABLE, &root->state))
+ if (test_bit(BTRFS_ROOT_SHAREABLE, &root->state))
be_nice = true;
path = btrfs_alloc_path();