diff options
Diffstat (limited to 'fs/freevxfs/vxfs_inode.c')
-rw-r--r-- | fs/freevxfs/vxfs_inode.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/freevxfs/vxfs_inode.c b/fs/freevxfs/vxfs_inode.c index 79d1b4ea13e7..1a4311437a8b 100644 --- a/fs/freevxfs/vxfs_inode.c +++ b/fs/freevxfs/vxfs_inode.c | |||
@@ -260,6 +260,7 @@ vxfs_get_fake_inode(struct super_block *sbp, struct vxfs_inode_info *vip) | |||
260 | struct inode *ip = NULL; | 260 | struct inode *ip = NULL; |
261 | 261 | ||
262 | if ((ip = new_inode(sbp))) { | 262 | if ((ip = new_inode(sbp))) { |
263 | ip->i_ino = get_next_ino(); | ||
263 | vxfs_iinit(ip, vip); | 264 | vxfs_iinit(ip, vip); |
264 | ip->i_mapping->a_ops = &vxfs_aops; | 265 | ip->i_mapping->a_ops = &vxfs_aops; |
265 | } | 266 | } |
@@ -271,7 +272,7 @@ vxfs_get_fake_inode(struct super_block *sbp, struct vxfs_inode_info *vip) | |||
271 | * *ip: VFS inode | 272 | * *ip: VFS inode |
272 | * | 273 | * |
273 | * Description: | 274 | * Description: |
274 | * vxfs_put_fake_inode frees all data asssociated with @ip. | 275 | * vxfs_put_fake_inode frees all data associated with @ip. |
275 | */ | 276 | */ |
276 | void | 277 | void |
277 | vxfs_put_fake_inode(struct inode *ip) | 278 | vxfs_put_fake_inode(struct inode *ip) |
@@ -336,6 +337,13 @@ vxfs_iget(struct super_block *sbp, ino_t ino) | |||
336 | return ip; | 337 | return ip; |
337 | } | 338 | } |
338 | 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 | |||
339 | /** | 347 | /** |
340 | * vxfs_evict_inode - remove inode from main memory | 348 | * vxfs_evict_inode - remove inode from main memory |
341 | * @ip: inode to discard. | 349 | * @ip: inode to discard. |
@@ -349,5 +357,5 @@ vxfs_evict_inode(struct inode *ip) | |||
349 | { | 357 | { |
350 | truncate_inode_pages(&ip->i_data, 0); | 358 | truncate_inode_pages(&ip->i_data, 0); |
351 | end_writeback(ip); | 359 | end_writeback(ip); |
352 | kmem_cache_free(vxfs_inode_cachep, ip->i_private); | 360 | call_rcu(&ip->i_rcu, vxfs_i_callback); |
353 | } | 361 | } |