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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 12:22:32 +0000 (13:22 +0100)
commitdb32c77427f773d625bc1e27720bd98cbb807185
tree6fc7ad5a7f4b1e46308a8c7aabd56ff8aad4e00b
parentd91c5de58cd9ed6d37f14bde906bb307bf681ba1
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/inode.c