aboutsummaryrefslogtreecommitdiffstats
path: root/fs/configfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/configfs/inode.c')
-rw-r--r--fs/configfs/inode.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c
index c8af2d91174b..41645142b88b 100644
--- a/fs/configfs/inode.c
+++ b/fs/configfs/inode.c
@@ -72,16 +72,11 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr)
72 if (!sd) 72 if (!sd)
73 return -EINVAL; 73 return -EINVAL;
74 74
75 sd_iattr = sd->s_iattr; 75 error = simple_setattr(dentry, iattr);
76
77 error = inode_change_ok(inode, iattr);
78 if (error)
79 return error;
80
81 error = inode_setattr(inode, iattr);
82 if (error) 76 if (error)
83 return error; 77 return error;
84 78
79 sd_iattr = sd->s_iattr;
85 if (!sd_iattr) { 80 if (!sd_iattr) {
86 /* setting attributes for the first time, allocate now */ 81 /* setting attributes for the first time, allocate now */
87 sd_iattr = kzalloc(sizeof(struct iattr), GFP_KERNEL); 82 sd_iattr = kzalloc(sizeof(struct iattr), GFP_KERNEL);