diff options
author | Nick Piggin <npiggin@suse.de> | 2010-05-27 08:42:19 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-05-27 22:15:47 -0400 |
commit | 3322e79a3860fd0d50e3c1879b2e98ac582c0ff6 (patch) | |
tree | 58ebfb1742c996dd9a40593c33c9ea1ff958efe8 /fs/configfs | |
parent | 15c6fd9786dfaab43547bf60df6fa63170fb64fc (diff) |
fs: convert simple fs to new truncate
Convert simple filesystems: ramfs, configfs, sysfs, block_dev to new truncate
sequence.
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/configfs')
-rw-r--r-- | fs/configfs/inode.c | 9 |
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); |