diff options
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r-- | fs/ceph/inode.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 2a48cafc174b..47f8c8baf3b5 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c | |||
@@ -368,6 +368,15 @@ struct inode *ceph_alloc_inode(struct super_block *sb) | |||
368 | return &ci->vfs_inode; | 368 | return &ci->vfs_inode; |
369 | } | 369 | } |
370 | 370 | ||
371 | static void ceph_i_callback(struct rcu_head *head) | ||
372 | { | ||
373 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
374 | struct ceph_inode_info *ci = ceph_inode(inode); | ||
375 | |||
376 | INIT_LIST_HEAD(&inode->i_dentry); | ||
377 | kmem_cache_free(ceph_inode_cachep, ci); | ||
378 | } | ||
379 | |||
371 | void ceph_destroy_inode(struct inode *inode) | 380 | void ceph_destroy_inode(struct inode *inode) |
372 | { | 381 | { |
373 | struct ceph_inode_info *ci = ceph_inode(inode); | 382 | struct ceph_inode_info *ci = ceph_inode(inode); |
@@ -407,7 +416,7 @@ void ceph_destroy_inode(struct inode *inode) | |||
407 | if (ci->i_xattrs.prealloc_blob) | 416 | if (ci->i_xattrs.prealloc_blob) |
408 | ceph_buffer_put(ci->i_xattrs.prealloc_blob); | 417 | ceph_buffer_put(ci->i_xattrs.prealloc_blob); |
409 | 418 | ||
410 | kmem_cache_free(ceph_inode_cachep, ci); | 419 | call_rcu(&inode->i_rcu, ceph_i_callback); |
411 | } | 420 | } |
412 | 421 | ||
413 | 422 | ||