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)
committerSasha Levin <sasha.levin@oracle.com>
Sat, 14 Mar 2015 19:37:27 +0000 (15:37 -0400)
commitc74eb981faeac66ad77545ecab2ed54d5b6fbe6e
tree3c49e9ddbf3b00bc10b8dea5f5f285a232f97ee0
parentbe9eb995384f8f619ab5255b29ba35c3b4780bed
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: Sasha Levin <sasha.levin@oracle.com>
fs/debugfs/inode.c