projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3bf25cb
)
udf: add assertions
author
Jan Kara
<
[email protected]
>
Tue, 8 May 2007 07:35:18 +0000
(
00:35
-0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 8 May 2007 18:15:21 +0000
(11:15 -0700)
Add a few assertions into udf_discard_prealloc() to check that the file is
sane (mostly helps debugging further patches ;).
Signed-off-by: Jan Kara <
[email protected]
>
Acked-by: Christoph Hellwig <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/udf/truncate.c
patch
|
blob
|
history
diff --git
a/fs/udf/truncate.c
b/fs/udf/truncate.c
index 0449b2216e716623d38ede18a80f2ee9b33e308f..0e328cdc9a454bdf46926bad9101912bb798fa0b 100644
(file)
--- a/
fs/udf/truncate.c
+++ b/
fs/udf/truncate.c
@@
-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_block
size)
+ 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);
@@
-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);
}