diff options
Diffstat (limited to 'fs/attr.c')
-rw-r--r-- | fs/attr.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -108,6 +108,11 @@ int notify_change(struct dentry * dentry, struct iattr * attr) | |||
108 | struct timespec now; | 108 | struct timespec now; |
109 | unsigned int ia_valid = attr->ia_valid; | 109 | unsigned int ia_valid = attr->ia_valid; |
110 | 110 | ||
111 | if (ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_TIMES_SET)) { | ||
112 | if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) | ||
113 | return -EPERM; | ||
114 | } | ||
115 | |||
111 | now = current_fs_time(inode->i_sb); | 116 | now = current_fs_time(inode->i_sb); |
112 | 117 | ||
113 | attr->ia_ctime = now; | 118 | attr->ia_ctime = now; |