summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds2019-07-31 22:26:54 +0200
committerLinus Torvalds2019-07-31 22:26:54 +0200
commit5c6207539aea8b22490f9569db5aa72ddfd0d486 (patch)
tree798e72f557db4427878a5969cdcd5cf192047dc4 /fs
parentBluetooth: hci_uart: check for missing tty operations (diff)
parentUnbreak mount_capable() (diff)
downloadkernel-qcow2-linux-5c6207539aea8b22490f9569db5aa72ddfd0d486.tar.gz
kernel-qcow2-linux-5c6207539aea8b22490f9569db5aa72ddfd0d486.tar.xz
kernel-qcow2-linux-5c6207539aea8b22490f9569db5aa72ddfd0d486.zip
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull mount_capable() fix from Al Viro. * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Unbreak mount_capable()
Diffstat (limited to 'fs')
-rw-r--r--fs/super.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/super.c b/fs/super.c
index 113c58f19425..5960578a4076 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -478,13 +478,10 @@ EXPORT_SYMBOL(generic_shutdown_super);
bool mount_capable(struct fs_context *fc)
{
- struct user_namespace *user_ns = fc->global ? &init_user_ns
- : fc->user_ns;
-
if (!(fc->fs_type->fs_flags & FS_USERNS_MOUNT))
return capable(CAP_SYS_ADMIN);
else
- return ns_capable(user_ns, CAP_SYS_ADMIN);
+ return ns_capable(fc->user_ns, CAP_SYS_ADMIN);
}
/**