X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fext4%2Fsuper.c;h=cd37f9d5e447f7c3fbc578dbddc8c988d435e6be;hb=42776163e13a56ea3096edff7a5df95408e80eb4;hp=fb15c9c0be74d5c06ba421f04449d981a69337ed;hpb=b69fc2efc9205d58c820eb2eb1caa6bf873b4b0d;p=karo-tx-linux.git 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) return drop; } +static void ext4_i_callback(struct rcu_head *head) +{ + struct inode *inode = container_of(head, struct inode, i_rcu); + INIT_LIST_HEAD(&inode->i_dentry); + kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); +} + static void ext4_destroy_inode(struct inode *inode) { ext4_ioend_wait(inode); @@ -853,7 +860,7 @@ static void ext4_destroy_inode(struct inode *inode) true); dump_stack(); } - kmem_cache_free(ext4_inode_cachep, EXT4_I(inode)); + call_rcu(&inode->i_rcu, ext4_i_callback); } static void init_once(void *foo)