fs: convert simple fs to new truncate

Convert simple filesystems: ramfs, configfs, sysfs, block_dev to new truncate
sequence.

Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Nick Piggin <[email protected]>
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Nick Piggin 2010-05-27 22:42:19 +10:00 • committed by Al Viro
commit 3322e79a38
5 changed files with 15 additions and 19 deletions

View file

@ -117,13 +117,11 @@ int sysfs_setattr(struct dentry *dentry, struct iattr *iattr)
if (error)
goto out;
iattr->ia_valid &= ~ATTR_SIZE; /* ignore size changes */
error = inode_setattr(inode, iattr);
if (error)
goto out;
/* this ignores size changes */
generic_setattr(inode, iattr);
error = sysfs_sd_setattr(sd, iattr);
out:
mutex_unlock(&sysfs_mutex);
return error;