aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext2/balloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext2/balloc.c')
-rw-r--r--fs/ext2/balloc.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index e8766a396776..c6c684b44ea1 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -571,7 +571,7 @@ do_more:
571error_return: 571error_return:
572 brelse(bitmap_bh); 572 brelse(bitmap_bh);
573 release_blocks(sb, freed); 573 release_blocks(sb, freed);
574 dquot_free_block(inode, freed); 574 dquot_free_block_nodirty(inode, freed);
575} 575}
576 576
577/** 577/**
@@ -1418,7 +1418,8 @@ allocated:
1418 1418
1419 *errp = 0; 1419 *errp = 0;
1420 brelse(bitmap_bh); 1420 brelse(bitmap_bh);
1421 dquot_free_block(inode, *count-num); 1421 dquot_free_block_nodirty(inode, *count-num);
1422 mark_inode_dirty(inode);
1422 *count = num; 1423 *count = num;
1423 return ret_block; 1424 return ret_block;
1424 1425
@@ -1428,8 +1429,10 @@ out:
1428 /* 1429 /*
1429 * Undo the block allocation 1430 * Undo the block allocation
1430 */ 1431 */
1431 if (!performed_allocation) 1432 if (!performed_allocation) {
1432 dquot_free_block(inode, *count); 1433 dquot_free_block_nodirty(inode, *count);
1434 mark_inode_dirty(inode);
1435 }
1433 brelse(bitmap_bh); 1436 brelse(bitmap_bh);
1434 return 0; 1437 return 0;
1435} 1438}