diff options
| -rw-r--r-- | fs/debugfs/inode.c | 13 | ||||
| -rw-r--r-- | fs/jffs2/readinode.c | 5 | ||||
| -rw-r--r-- | fs/jffs2/super.c | 5 | ||||
| -rw-r--r-- | fs/ubifs/super.c | 4 |
4 files changed, 14 insertions, 13 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 95b5e78c22b1..f25daa207421 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c | |||
| @@ -163,19 +163,24 @@ static int debugfs_show_options(struct seq_file *m, struct dentry *root) | |||
| 163 | return 0; | 163 | return 0; |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | static void debugfs_evict_inode(struct inode *inode) | 166 | static void debugfs_i_callback(struct rcu_head *head) |
| 167 | { | 167 | { |
| 168 | truncate_inode_pages_final(&inode->i_data); | 168 | struct inode *inode = container_of(head, struct inode, i_rcu); |
| 169 | clear_inode(inode); | ||
| 170 | if (S_ISLNK(inode->i_mode)) | 169 | if (S_ISLNK(inode->i_mode)) |
| 171 | kfree(inode->i_link); | 170 | kfree(inode->i_link); |
| 171 | free_inode_nonrcu(inode); | ||
| 172 | } | ||
| 173 | |||
| 174 | static void debugfs_destroy_inode(struct inode *inode) | ||
| 175 | { | ||
| 176 | call_rcu(&inode->i_rcu, debugfs_i_callback); | ||
| 172 | } | 177 | } |
| 173 | 178 | ||
| 174 | static const struct super_operations debugfs_super_operations = { | 179 | static const struct super_operations debugfs_super_operations = { |
| 175 | .statfs = simple_statfs, | 180 | .statfs = simple_statfs, |
| 176 | .remount_fs = debugfs_remount, | 181 | .remount_fs = debugfs_remount, |
| 177 | .show_options = debugfs_show_options, | 182 | .show_options = debugfs_show_options, |
| 178 | .evict_inode = debugfs_evict_inode, | 183 | .destroy_inode = debugfs_destroy_inode, |
| 179 | }; | 184 | }; |
| 180 | 185 | ||
| 181 | static void debugfs_release_dentry(struct dentry *dentry) | 186 | static void debugfs_release_dentry(struct dentry *dentry) |
diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c index 389ea53ea487..bccfc40b3a74 100644 --- a/fs/jffs2/readinode.c +++ b/fs/jffs2/readinode.c | |||
| @@ -1414,11 +1414,6 @@ void jffs2_do_clear_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f) | |||
| 1414 | 1414 | ||
| 1415 | jffs2_kill_fragtree(&f->fragtree, deleted?c:NULL); | 1415 | jffs2_kill_fragtree(&f->fragtree, deleted?c:NULL); |
| 1416 | 1416 | ||
| 1417 | if (f->target) { | ||
| 1418 | kfree(f->target); | ||
| 1419 | f->target = NULL; | ||
| 1420 | } | ||
| 1421 | |||
| 1422 | fds = f->dents; | 1417 | fds = f->dents; |
| 1423 | while(fds) { | 1418 | while(fds) { |
| 1424 | fd = fds; | 1419 | fd = fds; |
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index bb6ae387469f..05d892c79339 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c | |||
| @@ -47,7 +47,10 @@ static struct inode *jffs2_alloc_inode(struct super_block *sb) | |||
| 47 | static void jffs2_i_callback(struct rcu_head *head) | 47 | static void jffs2_i_callback(struct rcu_head *head) |
| 48 | { | 48 | { |
| 49 | struct inode *inode = container_of(head, struct inode, i_rcu); | 49 | struct inode *inode = container_of(head, struct inode, i_rcu); |
| 50 | kmem_cache_free(jffs2_inode_cachep, JFFS2_INODE_INFO(inode)); | 50 | struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); |
| 51 | |||
| 52 | kfree(f->target); | ||
| 53 | kmem_cache_free(jffs2_inode_cachep, f); | ||
| 51 | } | 54 | } |
| 52 | 55 | ||
| 53 | static void jffs2_destroy_inode(struct inode *inode) | 56 | static void jffs2_destroy_inode(struct inode *inode) |
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 8dc2818fdd84..12628184772c 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
| @@ -276,14 +276,12 @@ static void ubifs_i_callback(struct rcu_head *head) | |||
| 276 | { | 276 | { |
| 277 | struct inode *inode = container_of(head, struct inode, i_rcu); | 277 | struct inode *inode = container_of(head, struct inode, i_rcu); |
| 278 | struct ubifs_inode *ui = ubifs_inode(inode); | 278 | struct ubifs_inode *ui = ubifs_inode(inode); |
| 279 | kfree(ui->data); | ||
| 279 | kmem_cache_free(ubifs_inode_slab, ui); | 280 | kmem_cache_free(ubifs_inode_slab, ui); |
| 280 | } | 281 | } |
| 281 | 282 | ||
| 282 | static void ubifs_destroy_inode(struct inode *inode) | 283 | static void ubifs_destroy_inode(struct inode *inode) |
| 283 | { | 284 | { |
| 284 | struct ubifs_inode *ui = ubifs_inode(inode); | ||
| 285 | |||
| 286 | kfree(ui->data); | ||
| 287 | call_rcu(&inode->i_rcu, ubifs_i_callback); | 285 | call_rcu(&inode->i_rcu, ubifs_i_callback); |
| 288 | } | 286 | } |
| 289 | 287 | ||
