summaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-08-26 11:20:55 +0200
committerIngo Molnar <mingo@kernel.org>2019-08-26 11:20:55 +0200
commitb3e30c9884407599353e690a4eb36d0c4671bf62 (patch)
treed752d32d8a1a395cacd220313f24b933b2ed7294 /fs/super.c
parent342061c53a049569fc7f56d237753c26b4b2166d (diff)
parenta55aa89aab90fae7c815b0551b07be37db359d76 (diff)
downloadlinux-b3e30c9884407599353e690a4eb36d0c4671bf62.tar.bz2
Merge tag 'v5.3-rc6' into x86/cpu, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/super.c')
-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);
}
/**