mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
uninline may_mount() and don't opencode it in fspick(2)/fsopen(2)
It's done once per (mount-related) syscall and there's no point whatsoever making it inline. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -119,7 +119,7 @@ SYSCALL_DEFINE2(fsopen, const char __user *, _fs_name, unsigned int, flags)
|
||||
const char *fs_name;
|
||||
int ret;
|
||||
|
||||
if (!ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN))
|
||||
if (!may_mount())
|
||||
return -EPERM;
|
||||
|
||||
if (flags & ~FSOPEN_CLOEXEC)
|
||||
@@ -162,7 +162,7 @@ SYSCALL_DEFINE3(fspick, int, dfd, const char __user *, path, unsigned int, flags
|
||||
unsigned int lookup_flags;
|
||||
int ret;
|
||||
|
||||
if (!ns_capable(current->nsproxy->mnt_ns->user_ns, CAP_SYS_ADMIN))
|
||||
if (!may_mount())
|
||||
return -EPERM;
|
||||
|
||||
if ((flags & ~(FSPICK_CLOEXEC |
|
||||
|
Reference in New Issue
Block a user