diff options
author | David S. Miller <davem@davemloft.net> | 2010-06-26 10:27:00 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-26 10:27:00 -0700 |
commit | c67dda14389205f0a223c5089307495290939b3b (patch) | |
tree | fad0bb26b28703d02a22ebdd44d94eabac4a2ade /fs/configfs/inode.c | |
parent | 43bc2db47292a824152145253b1dd2847e7312a3 (diff) | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'fs/configfs/inode.c')
-rw-r--r-- | fs/configfs/inode.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c index c8af2d91174b..cf78d44a8d6a 100644 --- a/fs/configfs/inode.c +++ b/fs/configfs/inode.c @@ -73,15 +73,6 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr) return -EINVAL; sd_iattr = sd->s_iattr; - - error = inode_change_ok(inode, iattr); - if (error) - return error; - - error = inode_setattr(inode, iattr); - if (error) - return error; - if (!sd_iattr) { /* setting attributes for the first time, allocate now */ sd_iattr = kzalloc(sizeof(struct iattr), GFP_KERNEL); @@ -94,9 +85,12 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr) sd_iattr->ia_atime = sd_iattr->ia_mtime = sd_iattr->ia_ctime = CURRENT_TIME; sd->s_iattr = sd_iattr; } - /* attributes were changed atleast once in past */ + error = simple_setattr(dentry, iattr); + if (error) + return error; + if (ia_valid & ATTR_UID) sd_iattr->ia_uid = iattr->ia_uid; if (ia_valid & ATTR_GID) |