aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 8e7fcc253e43..86eefbafb7b4 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1395,11 +1395,18 @@ struct inode *nfs_alloc_inode(struct super_block *sb)
1395 return &nfsi->vfs_inode; 1395 return &nfsi->vfs_inode;
1396} 1396}
1397 1397
1398void nfs_destroy_inode(struct inode *inode) 1398static void nfs_i_callback(struct rcu_head *head)
1399{ 1399{
1400 struct inode *inode = container_of(head, struct inode, i_rcu);
1401 INIT_LIST_HEAD(&inode->i_dentry);
1400 kmem_cache_free(nfs_inode_cachep, NFS_I(inode)); 1402 kmem_cache_free(nfs_inode_cachep, NFS_I(inode));
1401} 1403}
1402 1404
1405void nfs_destroy_inode(struct inode *inode)
1406{
1407 call_rcu(&inode->i_rcu, nfs_i_callback);
1408}
1409
1403static inline void nfs4_init_once(struct nfs_inode *nfsi) 1410static inline void nfs4_init_once(struct nfs_inode *nfsi)
1404{ 1411{
1405#ifdef CONFIG_NFS_V4 1412#ifdef CONFIG_NFS_V4