mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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:
parent
15c6fd9786
commit
3322e79a38
5 changed files with 15 additions and 19 deletions
|
|
@ -72,16 +72,11 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr)
|
|||
if (!sd)
|
||||
return -EINVAL;
|
||||
|
||||
error = simple_setattr(dentry, iattr);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue