aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r--fs/fuse/inode.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index cfce3ad86a92..44e0a6c57e87 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -99,6 +99,13 @@ static struct inode *fuse_alloc_inode(struct super_block *sb)
99 return inode; 99 return inode;
100} 100}
101 101
102static void fuse_i_callback(struct rcu_head *head)
103{
104 struct inode *inode = container_of(head, struct inode, i_rcu);
105 INIT_LIST_HEAD(&inode->i_dentry);
106 kmem_cache_free(fuse_inode_cachep, inode);
107}
108
102static void fuse_destroy_inode(struct inode *inode) 109static void fuse_destroy_inode(struct inode *inode)
103{ 110{
104 struct fuse_inode *fi = get_fuse_inode(inode); 111 struct fuse_inode *fi = get_fuse_inode(inode);
@@ -106,7 +113,7 @@ static void fuse_destroy_inode(struct inode *inode)
106 BUG_ON(!list_empty(&fi->queued_writes)); 113 BUG_ON(!list_empty(&fi->queued_writes));
107 if (fi->forget_req) 114 if (fi->forget_req)
108 fuse_request_free(fi->forget_req); 115 fuse_request_free(fi->forget_req);
109 kmem_cache_free(fuse_inode_cachep, inode); 116 call_rcu(&inode->i_rcu, fuse_i_callback);
110} 117}
111 118
112void fuse_send_forget(struct fuse_conn *fc, struct fuse_req *req, 119void fuse_send_forget(struct fuse_conn *fc, struct fuse_req *req,