diff options
author | Nikolay Borisov <nborisov@suse.com> | 2020-08-31 14:42:38 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-10-07 12:12:17 +0200 |
commit | b79b724969ad5e5a01548c75f30fc14c893e825b (patch) | |
tree | 82b758c7f913354c53e50242b01f4dfffd0d3c8a | |
parent | ca9d473a3e300bcddc73c00fdf2f4bf6ca43c4a2 (diff) | |
download | lwn-b79b724969ad5e5a01548c75f30fc14c893e825b.tar.gz lwn-b79b724969ad5e5a01548c75f30fc14c893e825b.zip |
btrfs: make inode_tree_del take btrfs_inode
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/inode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1fbc7d9e5103..2306fbaafb28 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5305,15 +5305,15 @@ static void inode_tree_add(struct inode *inode) spin_unlock(&root->inode_lock); } -static void inode_tree_del(struct inode *inode) +static void inode_tree_del(struct btrfs_inode *inode) { - struct btrfs_root *root = BTRFS_I(inode)->root; + struct btrfs_root *root = inode->root; int empty = 0; spin_lock(&root->inode_lock); - if (!RB_EMPTY_NODE(&BTRFS_I(inode)->rb_node)) { - rb_erase(&BTRFS_I(inode)->rb_node, &root->inode_tree); - RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node); + if (!RB_EMPTY_NODE(&inode->rb_node)) { + rb_erase(&inode->rb_node, &root->inode_tree); + RB_CLEAR_NODE(&inode->rb_node); empty = RB_EMPTY_ROOT(&root->inode_tree); } spin_unlock(&root->inode_lock); @@ -8685,7 +8685,7 @@ void btrfs_destroy_inode(struct inode *inode) } } btrfs_qgroup_check_reserved_leak(BTRFS_I(inode)); - inode_tree_del(inode); + inode_tree_del(BTRFS_I(inode)); btrfs_drop_extent_cache(BTRFS_I(inode), 0, (u64)-1, 0); btrfs_inode_clear_file_extent_range(BTRFS_I(inode), 0, (u64)-1); btrfs_put_root(BTRFS_I(inode)->root); |