Skip to content

Commit

Permalink
hostfs: drop vmtruncate
Browse files Browse the repository at this point in the history
Removed vmtruncate.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Marco Stornelli authored and Richard Weinberger committed Oct 9, 2012
1 parent 37185b3 commit 3be2be0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fs/hostfs/hostfs_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3be2be0

Please sign in to comment.