diff options
Diffstat (limited to 'fs/freevxfs/vxfs_inode.c')
-rw-r--r-- | fs/freevxfs/vxfs_inode.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/freevxfs/vxfs_inode.c b/fs/freevxfs/vxfs_inode.c index 8c04eac5079d..2ba6719ac612 100644 --- a/fs/freevxfs/vxfs_inode.c +++ b/fs/freevxfs/vxfs_inode.c | |||
@@ -337,6 +337,13 @@ vxfs_iget(struct super_block *sbp, ino_t ino) | |||
337 | return ip; | 337 | return ip; |
338 | } | 338 | } |
339 | 339 | ||
340 | static void vxfs_i_callback(struct rcu_head *head) | ||
341 | { | ||
342 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
343 | INIT_LIST_HEAD(&inode->i_dentry); | ||
344 | kmem_cache_free(vxfs_inode_cachep, inode->i_private); | ||
345 | } | ||
346 | |||
340 | /** | 347 | /** |
341 | * vxfs_evict_inode - remove inode from main memory | 348 | * vxfs_evict_inode - remove inode from main memory |
342 | * @ip: inode to discard. | 349 | * @ip: inode to discard. |
@@ -350,5 +357,5 @@ vxfs_evict_inode(struct inode *ip) | |||
350 | { | 357 | { |
351 | truncate_inode_pages(&ip->i_data, 0); | 358 | truncate_inode_pages(&ip->i_data, 0); |
352 | end_writeback(ip); | 359 | end_writeback(ip); |
353 | kmem_cache_free(vxfs_inode_cachep, ip->i_private); | 360 | call_rcu(&ip->i_rcu, vxfs_i_callback); |
354 | } | 361 | } |