diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-31 13:26:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-31 13:26:54 -0700 |
commit | 5c6207539aea8b22490f9569db5aa72ddfd0d486 (patch) | |
tree | 798e72f557db4427878a5969cdcd5cf192047dc4 /fs | |
parent | b36a1552d7319bbfd5cf7f08726c23c5c66d4f73 (diff) | |
parent | c2c44ec20a8496f7a3b3401c092afe96908eced1 (diff) | |
download | blackbird-op-linux-5c6207539aea8b22490f9569db5aa72ddfd0d486.tar.gz blackbird-op-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.c | 5 |
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); } /** |