summaryrefslogtreecommitdiff
path: root/fs/attr.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-06 12:26:02 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-06-06 12:26:02 +0100
commitaa72f6899b9fb3dc824c458234ae3507a60e462d (patch)
tree97480a3cefc3d864ffd6eb994ec09ab5d680eabe /fs/attr.c
parente6a9be0bb018466896632969ba4b496d1a7caea9 (diff)
parent05d3962cc921c51059df69488c7f70ab8b6a5d88 (diff)
downloadlinux-3.10-aa72f6899b9fb3dc824c458234ae3507a60e462d.tar.gz
linux-3.10-aa72f6899b9fb3dc824c458234ae3507a60e462d.tar.bz2
linux-3.10-aa72f6899b9fb3dc824c458234ae3507a60e462d.zip
Merge branch 'for-3.0' into for-3.1
Diffstat (limited to 'fs/attr.c')
-rw-r--r--fs/attr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/attr.c b/fs/attr.c
index 91dbe2a107f..caf2aa521e2 100644
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -175,6 +175,13 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
return -EPERM;
}
+ if ((ia_valid & ATTR_MODE)) {
+ mode_t amode = attr->ia_mode;
+ /* Flag setting protected by i_mutex */
+ if (is_sxid(amode))
+ inode->i_flags &= ~S_NOSEC;
+ }
+
now = current_fs_time(inode->i_sb);
attr->ia_ctime = now;