diff options
author | David Howells <dhowells@redhat.com> | 2008-10-23 23:59:46 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2008-10-23 23:59:46 +0100 |
commit | 825c53eaed424d7858407531b95dcf9a0901857e (patch) | |
tree | 10cb6cbcbc7d12539d7fef7d2a439b76064310c4 /fs/attr.c | |
parent | 61afa30db72458a4eac28a418ebed7406aaa0389 (diff) | |
parent | 332edc2f7fa58b818dfed1cede60272eecc27c0a (diff) |
Merge branch 'master' into creds-v4
Conflicts:
fs/namespace.c
fs/nfsd/nfs4recover.c
Manually resolved.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/attr.c')
-rw-r--r-- | fs/attr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/attr.c b/fs/attr.c index faa433acce93..f4360192a938 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -159,17 +159,17 @@ int notify_change(struct dentry * dentry, struct iattr * attr) if (!(attr->ia_valid & ~(ATTR_KILL_SUID | ATTR_KILL_SGID))) return 0; + error = security_inode_setattr(dentry, attr); + if (error) + return error; + if (ia_valid & ATTR_SIZE) down_write(&dentry->d_inode->i_alloc_sem); if (inode->i_op && inode->i_op->setattr) { - error = security_inode_setattr(dentry, attr); - if (!error) - error = inode->i_op->setattr(dentry, attr); + error = inode->i_op->setattr(dentry, attr); } else { error = inode_change_ok(inode, attr); - if (!error) - error = security_inode_setattr(dentry, attr); if (!error) { if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) || (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid)) |