aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ramfs/file-nommu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ramfs/file-nommu.c b/fs/ramfs/file-nommu.c
index 9345a46ffb32..5d258c40a2fd 100644
--- a/fs/ramfs/file-nommu.c
+++ b/fs/ramfs/file-nommu.c
@@ -195,6 +195,11 @@ static int ramfs_nommu_setattr(struct dentry *dentry, struct iattr *ia)
195 unsigned int old_ia_valid = ia->ia_valid; 195 unsigned int old_ia_valid = ia->ia_valid;
196 int ret = 0; 196 int ret = 0;
197 197
198 /* POSIX UID/GID verification for setting inode attributes */
199 ret = inode_change_ok(inode, ia);
200 if (ret)
201 return ret;
202
198 /* by providing our own setattr() method, we skip this quotaism */ 203 /* by providing our own setattr() method, we skip this quotaism */
199 if ((old_ia_valid & ATTR_UID && ia->ia_uid != inode->i_uid) || 204 if ((old_ia_valid & ATTR_UID && ia->ia_uid != inode->i_uid) ||
200 (old_ia_valid & ATTR_GID && ia->ia_gid != inode->i_gid)) 205 (old_ia_valid & ATTR_GID && ia->ia_gid != inode->i_gid))