Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54815
b: refs/heads/master
c: 948b9b2
h: refs/heads/master
i:
  54813: a97a690
  54811: d3f5ec0
  54807: 3441435
  54799: b316644
  54783: 0f9f331
v: v3
  • Loading branch information
Jan Kara authored and Linus Torvalds committed May 8, 2007
1 parent 524feb5 commit 1340df0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: 3bf25cb40d899eeb5a471f497e56ddfe2c96c019
refs/heads/master: 948b9b2c967c3bec6136b2dbb9e1c12f62e03efa
4 changes: 3 additions & 1 deletion trunk/fs/udf/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ void udf_discard_prealloc(struct inode * inode)
{
etype = netype;
lbcount += elen;
if (lbcount > inode->i_size && lbcount - inode->i_size < inode->i_sb->s_blocksize)
if (lbcount > inode->i_size && lbcount - elen < inode->i_size)
{
WARN_ON(lbcount - inode->i_size >= inode->i_sb->s_blocksize);
nelen = elen - (lbcount - inode->i_size);
epos.offset -= adsize;
extent_trunc(inode, &epos, eloc, etype, elen, nelen);
Expand Down Expand Up @@ -119,6 +120,7 @@ void udf_discard_prealloc(struct inode * inode)
}
UDF_I_LENEXTENTS(inode) = lbcount;

WARN_ON(lbcount != inode->i_size);
brelse(epos.bh);
}

Expand Down

0 comments on commit 1340df0

Please sign in to comment.