• Al Viro's avatar
    move mount_capable() calls to vfs_get_tree() · 059338aa
    Al Viro authored
    sget_fc() is called only from ->get_tree() instances and
    the only instance not calling it is legacy_get_tree(),
    which calls mount_capable() directly.
    
    In all sget_fc() callers the checks could be moved to the
    very beginning of ->get_tree() - ->user_ns is not changed
    in between.  So lifting the checks to the only caller of
    ->get_tree() is OK.
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    059338aa
super.c 45 KB