aboutsummaryrefslogtreecommitdiffstats
path: root/fs/attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/attr.c')
-rw-r--r--fs/attr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/attr.c b/fs/attr.c
index 0da90951d277..29e38a1f7f77 100644
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -171,6 +171,8 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
171 struct timespec now; 171 struct timespec now;
172 unsigned int ia_valid = attr->ia_valid; 172 unsigned int ia_valid = attr->ia_valid;
173 173
174 WARN_ON_ONCE(!mutex_is_locked(&inode->i_mutex));
175
174 if (ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_TIMES_SET)) { 176 if (ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_TIMES_SET)) {
175 if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) 177 if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
176 return -EPERM; 178 return -EPERM;
@@ -250,5 +252,4 @@ int notify_change(struct dentry * dentry, struct iattr * attr)
250 252
251 return error; 253 return error;
252} 254}
253
254EXPORT_SYMBOL(notify_change); 255EXPORT_SYMBOL(notify_change);