• Al Viro's avatar
    debugfs: leave freeing a symlink body until inode eviction · 3f02b323
    Al Viro authored
    commit 0db59e59 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: default avatarAl 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: default avatarZefan Li <lizefan@huawei.com>
    3f02b323
inode.c 17.4 KB