Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347805
b: refs/heads/master
c: 5dfc282
h: refs/heads/master
i:
  347803: 193fcbe
v: v3
  • Loading branch information
Marco Stornelli authored and Al Viro committed Dec 20, 2012
1 parent ab0e172 commit 636dd59
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d506848567b529e57dfbcc4e28747b9211ffb7e5
refs/heads/master: 5dfc2821e87893695bf4751fcbbdb56f42fa2985
10 changes: 8 additions & 2 deletions trunk/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 636dd59

Please sign in to comment.