aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-07-09 07:24:21 -0400
committerJan Kara <jack@suse.cz>2012-07-09 07:24:21 -0400
commit17dc59ba418c3d6b0675d5b74d280acab2d4e369 (patch)
tree49e7310921260fc3e1f43e76a052ee6733982f6f /fs/udf
parentbff943af6fe3af022c1c7a22cdb2e18a242eaf35 (diff)
udf: Do not decrement i_blocks when freeing indirect extent block
Indirect extent block is not accounted in i_blocks during allocation thus we should not decrement i_blocks when we are freeing such block during truncation. Reported-by: Steve Nickel <snickel58@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf')
-rw-r--r--fs/udf/truncate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/udf/truncate.c b/fs/udf/truncate.c
index 4b98fee8e161..8a9657d7f7c6 100644
--- a/fs/udf/truncate.c
+++ b/fs/udf/truncate.c
@@ -248,7 +248,7 @@ void udf_truncate_extents(struct inode *inode)
248 /* We managed to free all extents in the 248 /* We managed to free all extents in the
249 * indirect extent - free it too */ 249 * indirect extent - free it too */
250 BUG_ON(!epos.bh); 250 BUG_ON(!epos.bh);
251 udf_free_blocks(sb, inode, &epos.block, 251 udf_free_blocks(sb, NULL, &epos.block,
252 0, indirect_ext_len); 252 0, indirect_ext_len);
253 } else if (!epos.bh) { 253 } else if (!epos.bh) {
254 iinfo->i_lenAlloc = lenalloc; 254 iinfo->i_lenAlloc = lenalloc;
@@ -275,7 +275,7 @@ void udf_truncate_extents(struct inode *inode)
275 275
276 if (indirect_ext_len) { 276 if (indirect_ext_len) {
277 BUG_ON(!epos.bh); 277 BUG_ON(!epos.bh);
278 udf_free_blocks(sb, inode, &epos.block, 0, indirect_ext_len); 278 udf_free_blocks(sb, NULL, &epos.block, 0, indirect_ext_len);
279 } else if (!epos.bh) { 279 } else if (!epos.bh) {
280 iinfo->i_lenAlloc = lenalloc; 280 iinfo->i_lenAlloc = lenalloc;
281 mark_inode_dirty(inode); 281 mark_inode_dirty(inode);