diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-08 20:50:54 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-07-08 20:50:54 +0300 |
commit | b8d4c1f9f48e344fe1d6e6ffae01d4b31bf0aac0 (patch) | |
tree | 24685a7b0ebf8af0ff55f1384e0be125aa29da47 /fs/inode.c | |
parent | 090a81d8766e21d33ab3e4d24e6c8e5eedf086dd (diff) | |
parent | 49d31c2f389acfe83417083e1208422b4091cd9e (diff) | |
download | linux-b8d4c1f9f48e344fe1d6e6ffae01d4b31bf0aac0.tar.xz |
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.c | 2 |
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; } |