diff options
Diffstat (limited to 'fs/hfs/super.c')
-rw-r--r-- | fs/hfs/super.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 4824c27cebb8..ef4ee5716abe 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c | |||
@@ -167,11 +167,18 @@ static struct inode *hfs_alloc_inode(struct super_block *sb) | |||
167 | return i ? &i->vfs_inode : NULL; | 167 | return i ? &i->vfs_inode : NULL; |
168 | } | 168 | } |
169 | 169 | ||
170 | static void hfs_destroy_inode(struct inode *inode) | 170 | static void hfs_i_callback(struct rcu_head *head) |
171 | { | 171 | { |
172 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
173 | INIT_LIST_HEAD(&inode->i_dentry); | ||
172 | kmem_cache_free(hfs_inode_cachep, HFS_I(inode)); | 174 | kmem_cache_free(hfs_inode_cachep, HFS_I(inode)); |
173 | } | 175 | } |
174 | 176 | ||
177 | static void hfs_destroy_inode(struct inode *inode) | ||
178 | { | ||
179 | call_rcu(&inode->i_rcu, hfs_i_callback); | ||
180 | } | ||
181 | |||
175 | static const struct super_operations hfs_super_operations = { | 182 | static const struct super_operations hfs_super_operations = { |
176 | .alloc_inode = hfs_alloc_inode, | 183 | .alloc_inode = hfs_alloc_inode, |
177 | .destroy_inode = hfs_destroy_inode, | 184 | .destroy_inode = hfs_destroy_inode, |