diff options
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r-- | fs/gfs2/super.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 2b2c4997430b..16c2ecac7eb7 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -1405,11 +1405,18 @@ static struct inode *gfs2_alloc_inode(struct super_block *sb) | |||
1405 | return &ip->i_inode; | 1405 | return &ip->i_inode; |
1406 | } | 1406 | } |
1407 | 1407 | ||
1408 | static void gfs2_destroy_inode(struct inode *inode) | 1408 | static void gfs2_i_callback(struct rcu_head *head) |
1409 | { | 1409 | { |
1410 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
1411 | INIT_LIST_HEAD(&inode->i_dentry); | ||
1410 | kmem_cache_free(gfs2_inode_cachep, inode); | 1412 | kmem_cache_free(gfs2_inode_cachep, inode); |
1411 | } | 1413 | } |
1412 | 1414 | ||
1415 | static void gfs2_destroy_inode(struct inode *inode) | ||
1416 | { | ||
1417 | call_rcu(&inode->i_rcu, gfs2_i_callback); | ||
1418 | } | ||
1419 | |||
1413 | const struct super_operations gfs2_super_ops = { | 1420 | const struct super_operations gfs2_super_ops = { |
1414 | .alloc_inode = gfs2_alloc_inode, | 1421 | .alloc_inode = gfs2_alloc_inode, |
1415 | .destroy_inode = gfs2_destroy_inode, | 1422 | .destroy_inode = gfs2_destroy_inode, |