projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mlxsw: spectrum: Remove redundant errors from the code
[cascardo/linux.git]
/
fs
/
xattr.c
diff --git
a/fs/xattr.c
b/fs/xattr.c
index
4beafc4
..
c243905
100644
(file)
--- a/
fs/xattr.c
+++ b/
fs/xattr.c
@@
-38,6
+38,13
@@
xattr_permission(struct inode *inode, const char *name, int mask)
if (mask & MAY_WRITE) {
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
return -EPERM;
if (mask & MAY_WRITE) {
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
return -EPERM;
+ /*
+ * Updating an xattr will likely cause i_uid and i_gid
+ * to be writen back improperly if their true value is
+ * unknown to the vfs.
+ */
+ if (HAS_UNMAPPED_ID(inode))
+ return -EPERM;
}
/*
}
/*