diff options
author | Qu Wenruo <wqu@suse.com> | 2020-05-15 09:01:41 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-05-25 12:25:35 +0300 |
commit | 82028e0a2a9b7a3db6ef1f1885c580a37ab9eebb (patch) | |
tree | 9e896e8a29accafc00668a65aae30f6b843f1622 /tools/perf/scripts/python/syscall-counts.py | |
parent | 92a7cc4252231d1641b36c38cf845cfc50308ab0 (diff) | |
download | linux-82028e0a2a9b7a3db6ef1f1885c580a37ab9eebb.tar.xz |
btrfs: inode: cleanup the log-tree exceptions in btrfs_truncate_inode_items()
There are a lot of root owner checks in btrfs_truncate_inode_items()
like:
if (test_bit(BTRFS_ROOT_SHAREABLE, &root->state) ||
root == fs_info->tree_root)
But considering that, only these trees can have INODE_ITEMs:
- tree root (for v1 space cache)
- subvolume trees
- tree reloc trees
- data reloc tree
- log trees
And since subvolume/tree reloc/data reloc trees all have SHAREABLE bit,
and we're checking tree root manually, so above check is just excluding
log trees.
This patch will replace two of such checks to a simpler one:
if (root->root_key.objectid != BTRFS_TREE_LOG_OBJECTID)
This would merge btrfs_drop_extent_cache() and lock_extent_bits() call
into the same if branch.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions