From ea27bc546b0453ef2cd1ad62a30743277d2f4014 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 20 Jun 2012 09:55:58 +1000 Subject: [PATCH] --- yaml --- r: 312934 b: refs/heads/master c: c4107b3097465e25f7d6a9b0ac0518b07b24e774 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/attr.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 7d16cfffa40b..de19730520d7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b5fb63c18315c5510c1d0636179c057e0c761c77 +refs/heads/master: c4107b3097465e25f7d6a9b0ac0518b07b24e774 diff --git a/trunk/fs/attr.c b/trunk/fs/attr.c index 0da90951d277..29e38a1f7f77 100644 --- a/trunk/fs/attr.c +++ b/trunk/fs/attr.c @@ -171,6 +171,8 @@ int notify_change(struct dentry * dentry, struct iattr * attr) struct timespec now; unsigned int ia_valid = attr->ia_valid; + WARN_ON_ONCE(!mutex_is_locked(&inode->i_mutex)); + if (ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID | ATTR_TIMES_SET)) { if (IS_IMMUTABLE(inode) || IS_APPEND(inode)) return -EPERM; @@ -250,5 +252,4 @@ int notify_change(struct dentry * dentry, struct iattr * attr) return error; } - EXPORT_SYMBOL(notify_change);