Skip to content

Commit

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

Signed-off-by: Marco Stornelli <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Marco Stornelli authored and Al Viro committed Dec 20, 2012
1 parent d506848 commit 5dfc282
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions fs/logfs/readwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5dfc282

Please sign in to comment.