diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-04-10 21:14:41 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-05-02 04:43:26 +0200 |
commit | 26602cab411782dab49a75b316f375933ef380d3 (patch) | |
tree | 51722e730fee1ccc0229fa9d0e44b71473ba8c5a /fs/btrfs/inode.c | |
parent | afs: switch to use of ->free_inode() (diff) | |
download | linux-26602cab411782dab49a75b316f375933ef380d3.tar.xz linux-26602cab411782dab49a75b316f375933ef380d3.zip |
btrfs: use ->free_inode()
a lot of stuff remains in ->destroy_inode()
Acked-by: David Sterba <dsterba@suse.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 82fdda8ff5ab..aeb31c2dc14e 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -9206,9 +9206,8 @@ void btrfs_test_destroy_inode(struct inode *inode) } #endif -static void btrfs_i_callback(struct rcu_head *head) +void btrfs_free_inode(struct inode *inode) { - struct inode *inode = container_of(head, struct inode, i_rcu); kmem_cache_free(btrfs_inode_cachep, BTRFS_I(inode)); } @@ -9234,7 +9233,7 @@ void btrfs_destroy_inode(struct inode *inode) * created. */ if (!root) - goto free; + return; while (1) { ordered = btrfs_lookup_first_ordered_extent(inode, (u64)-1); @@ -9252,8 +9251,6 @@ void btrfs_destroy_inode(struct inode *inode) btrfs_qgroup_check_reserved_leak(inode); inode_tree_del(inode); btrfs_drop_extent_cache(BTRFS_I(inode), 0, (u64)-1, 0); -free: - call_rcu(&inode->i_rcu, btrfs_i_callback); } int btrfs_drop_inode(struct inode *inode) |