summaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-07-08 19:50:54 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2017-07-08 19:50:54 +0200
commitb8d4c1f9f48e344fe1d6e6ffae01d4b31bf0aac0 (patch)
tree24685a7b0ebf8af0ff55f1384e0be125aa29da47 /fs/inode.c
parentMerge branch 'for-spi' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs (diff)
parentdentry name snapshots (diff)
downloadlinux-b8d4c1f9f48e344fe1d6e6ffae01d4b31bf0aac0.tar.xz
linux-b8d4c1f9f48e344fe1d6e6ffae01d4b31bf0aac0.zip
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull misc filesystem updates from Al Viro: "Assorted normal VFS / filesystems stuff..." * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: dentry name snapshots Make statfs properly return read-only state after emergency remount fs/dcache: init in_lookup_hashtable minix: Deinline get_block, save 2691 bytes fs: Reorder inode_owner_or_capable() to avoid needless fs: warn in case userspace lied about modprobe return
Diffstat (limited to 'fs/inode.c')
-rw-r--r--fs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 5cbc8e6e9390..50370599e371 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -2014,7 +2014,7 @@ bool inode_owner_or_capable(const struct inode *inode)
return true;
ns = current_user_ns();
- if (ns_capable(ns, CAP_FOWNER) && kuid_has_mapping(ns, inode->i_uid))
+ if (kuid_has_mapping(ns, inode->i_uid) && ns_capable(ns, CAP_FOWNER))
return true;
return false;
}