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 e67e31c73416..017daa3bed38 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1438,11 +1438,18 @@ struct inode *nfs_alloc_inode(struct super_block *sb)
1438 return &nfsi->vfs_inode; 1438 return &nfsi->vfs_inode;
1439} 1439}
1440 1440
1441void nfs_destroy_inode(struct inode *inode) 1441static void nfs_i_callback(struct rcu_head *head)
1442{ 1442{
1443 struct inode *inode = container_of(head, struct inode, i_rcu);
1444 INIT_LIST_HEAD(&inode->i_dentry);
1443 kmem_cache_free(nfs_inode_cachep, NFS_I(inode)); 1445 kmem_cache_free(nfs_inode_cachep, NFS_I(inode));
1444} 1446}
1445 1447
1448void nfs_destroy_inode(struct inode *inode)
1449{
1450 call_rcu(&inode->i_rcu, nfs_i_callback);
1451}
1452
1446static inline void nfs4_init_once(struct nfs_inode *nfsi) 1453static inline void nfs4_init_once(struct nfs_inode *nfsi)
1447{ 1454{
1448#ifdef CONFIG_NFS_V4 1455#ifdef CONFIG_NFS_V4