diff options
Diffstat (limited to 'fs/logfs')
-rw-r--r-- | fs/logfs/inode.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/logfs/inode.c b/fs/logfs/inode.c index d8c71ece098f..03b8c240aeda 100644 --- a/fs/logfs/inode.c +++ b/fs/logfs/inode.c | |||
@@ -141,13 +141,20 @@ struct inode *logfs_safe_iget(struct super_block *sb, ino_t ino, int *is_cached) | |||
141 | return __logfs_iget(sb, ino); | 141 | return __logfs_iget(sb, ino); |
142 | } | 142 | } |
143 | 143 | ||
144 | static void logfs_i_callback(struct rcu_head *head) | ||
145 | { | ||
146 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
147 | INIT_LIST_HEAD(&inode->i_dentry); | ||
148 | kmem_cache_free(logfs_inode_cache, logfs_inode(inode)); | ||
149 | } | ||
150 | |||
144 | static void __logfs_destroy_inode(struct inode *inode) | 151 | static void __logfs_destroy_inode(struct inode *inode) |
145 | { | 152 | { |
146 | struct logfs_inode *li = logfs_inode(inode); | 153 | struct logfs_inode *li = logfs_inode(inode); |
147 | 154 | ||
148 | BUG_ON(li->li_block); | 155 | BUG_ON(li->li_block); |
149 | list_del(&li->li_freeing_list); | 156 | list_del(&li->li_freeing_list); |
150 | kmem_cache_free(logfs_inode_cache, li); | 157 | call_rcu(&inode->i_rcu, logfs_i_callback); |
151 | } | 158 | } |
152 | 159 | ||
153 | static void logfs_destroy_inode(struct inode *inode) | 160 | static void logfs_destroy_inode(struct inode *inode) |