Permalink
Browse files

logfs: drop vmtruncate

Removed vmtruncate

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information...
1 parent d506848 commit 5dfc2821e87893695bf4751fcbbdb56f42fa2985 Marco Stornelli committed with Al Viro Dec 15, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 fs/logfs/readwrite.c
View
@@ -1887,9 +1887,15 @@ int logfs_truncate(struct inode *inode, u64 target)
logfs_put_wblocks(sb, NULL, 1);
}
- if (!err)
- err = vmtruncate(inode, target);
+ if (!err) {
+ err = inode_newsize_ok(inode, target);
+ if (err)
+ goto out;
+
+ truncate_setsize(inode, target);
+ }
+ out:
/* I don't trust error recovery yet. */
WARN_ON(err);
return err;

0 comments on commit 5dfc282

Please sign in to comment.