]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
debugfs: leave freeing a symlink body until inode eviction
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 22 Feb 2015 03:05:11 +0000 (22:05 -0500)
committerZefan Li <lizefan@huawei.com>
Fri, 19 Jun 2015 03:40:18 +0000 (11:40 +0800)
commit3f02b323742bb69a1ff9b73bc17d88fb63fb64ed
treed88021103874e117c76ad92768ab485e020d64eb
parentbcf9fe97c24187e0590536886281a120e2bfbeba
debugfs: leave freeing a symlink body until inode eviction

commit 0db59e59299f0b67450c5db21f7f316c8fb04e84 upstream.

As it is, we have debugfs_remove() racing with symlink traversals.
Supply ->evict_inode() and do freeing there - inode will remain
pinned until we are done with the symlink body.

And rip the idiocy with checking if dentry is positive right after
we'd verified debugfs_positive(), which is a stronger check...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[lizf: Backported to 3.4:
 - call end_writeback() instead of clear_inode()
 - call truncate_inode_pages() instead of truncate_inode_pages_final()]
Signed-off-by: Zefan Li <lizefan@huawei.com>
fs/debugfs/inode.c