diff options
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index fb15c9c0be74..cd37f9d5e447 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -841,6 +841,13 @@ static int ext4_drop_inode(struct inode *inode) | |||
841 | return drop; | 841 | return drop; |
842 | } | 842 | } |
843 | 843 | ||
844 | static void ext4_i_callback(struct rcu_head *head) | ||
845 | { | ||
846 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
847 | INIT_LIST_HEAD(&inode->i_dentry); | ||
848 | kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); | ||
849 | } | ||
850 | |||
844 | static void ext4_destroy_inode(struct inode *inode) | 851 | static void ext4_destroy_inode(struct inode *inode) |
845 | { | 852 | { |
846 | ext4_ioend_wait(inode); | 853 | ext4_ioend_wait(inode); |
@@ -853,7 +860,7 @@ static void ext4_destroy_inode(struct inode *inode) | |||
853 | true); | 860 | true); |
854 | dump_stack(); | 861 | dump_stack(); |
855 | } | 862 | } |
856 | kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); | 863 | call_rcu(&inode->i_rcu, ext4_i_callback); |
857 | } | 864 | } |
858 | 865 | ||
859 | static void init_once(void *foo) | 866 | static void init_once(void *foo) |