diff options
author | Marco Stornelli <marco.stornelli@gmail.com> | 2012-10-06 10:31:13 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2012-10-09 22:33:19 +0200 |
commit | 3be2be0a32c18b0fd6d623cda63174a332ca0de1 (patch) | |
tree | 43a223182060de834768e0c1c1ca2602f19a8da4 /fs | |
parent | um: get rid of pointless include "..." where include <...> will do (diff) | |
download | linux-3be2be0a32c18b0fd6d623cda63174a332ca0de1.tar.xz linux-3be2be0a32c18b0fd6d623cda63174a332ca0de1.zip |
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')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 8 |
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); |