summaryrefslogtreecommitdiffstats
path: root/fs/hostfs
diff options
context:
space:
mode:
authorMarco Stornelli <marco.stornelli@gmail.com>2012-10-06 10:31:13 +0200
committerRichard Weinberger <richard@nod.at>2012-10-09 22:33:19 +0200
commit3be2be0a32c18b0fd6d623cda63174a332ca0de1 (patch)
tree43a223182060de834768e0c1c1ca2602f19a8da4 /fs/hostfs
parent37185b33240870719b6b5913a46e6a441f1ae96f (diff)
downloadlinux-3be2be0a32c18b0fd6d623cda63174a332ca0de1.tar.bz2
hostfs: drop vmtruncate
Removed vmtruncate. Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/hostfs')
-rw-r--r--fs/hostfs/hostfs_kern.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
index 9e45f65241ee..3c423c746b59 100644
--- a/fs/hostfs/hostfs_kern.c
+++ b/fs/hostfs/hostfs_kern.c
@@ -848,9 +848,11 @@ int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
attr->ia_size != i_size_read(inode)) {
int error;
- error = vmtruncate(inode, attr->ia_size);
- if (err)
- return err;
+ error = inode_newsize_ok(inode, attr->ia_size);
+ if (error)
+ return error;
+
+ truncate_setsize(inode, attr->ia_size);
}
setattr_copy(inode, attr);