From a2bd817f82c242d77327d6bdd9710312fec59457 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Wed, 30 Jul 2008 14:06:22 +0200 Subject: [PATCH] --- yaml --- r: 117488 b: refs/heads/master c: a77b72da24ecfe262760874c55e3f6461f1dec0d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/attr.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index bcc5cd92fd86..0205c01b19db 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2c512397ca060f6dbcb3957174a91e29a3b769be +refs/heads/master: a77b72da24ecfe262760874c55e3f6461f1dec0d diff --git a/trunk/fs/attr.c b/trunk/fs/attr.c index 26c71ba1eed4..7a83819f6ba2 100644 --- a/trunk/fs/attr.c +++ b/trunk/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))