Merge branch 'work.icache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs inode freeing updates from Al Viro: "Introduction of separate method for RCU-delayed part of ->destroy_inode() (if any). Pretty much as posted, except that destroy_inode() stashes ->free_inode into the victim (anon-unioned with ->i_fops) before scheduling i_callback() and the last two patches (sockfs conversion and folding struct socket_wq into struct socket) are excluded - that pair should go through netdev once davem reopens his tree" * 'work.icache' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (58 commits) orangefs: make use of ->free_inode() shmem: make use of ->free_inode() hugetlb: make use of ->free_inode() overlayfs: make use of ->free_inode() jfs: switch to ->free_inode() fuse: switch to ->free_inode() ext4: make use of ->free_inode() ecryptfs: make use of ->free_inode() ceph: use ->free_inode() btrfs: use ->free_inode() afs: switch to use of ->free_inode() dax: make use of ->free_inode() ntfs: switch to ->free_inode() securityfs: switch to ->free_inode() apparmor: switch to ->free_inode() rpcpipe: switch to ->free_inode() bpf: switch to ->free_inode() mqueue: switch to ->free_inode() ufs: switch to ->free_inode() coda: switch to ->free_inode() ...
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user