diff options
Diffstat (limited to 'fs/xattr.c')
-rw-r--r-- | fs/xattr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xattr.c b/fs/xattr.c index 4beafc43daa5..c243905835ab 100644 --- a/fs/xattr.c +++ b/fs/xattr.c | |||
@@ -38,6 +38,13 @@ xattr_permission(struct inode *inode, const char *name, int mask) | |||
38 | if (mask & MAY_WRITE) { | 38 | if (mask & MAY_WRITE) { |
39 | if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) | 39 | if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) |
40 | return -EPERM; | 40 | return -EPERM; |
41 | /* | ||
42 | * Updating an xattr will likely cause i_uid and i_gid | ||
43 | * to be writen back improperly if their true value is | ||
44 | * unknown to the vfs. | ||
45 | */ | ||
46 | if (HAS_UNMAPPED_ID(inode)) | ||
47 | return -EPERM; | ||
41 | } | 48 | } |
42 | 49 | ||
43 | /* | 50 | /* |