mbcache: Remove unused features
[cascardo/linux.git] / fs / ext2 / balloc.c
index e8766a3..c6c684b 100644 (file)
@@ -571,7 +571,7 @@ do_more:
 error_return:
        brelse(bitmap_bh);
        release_blocks(sb, freed);
-       dquot_free_block(inode, freed);
+       dquot_free_block_nodirty(inode, freed);
 }
 
 /**
@@ -1418,7 +1418,8 @@ allocated:
 
        *errp = 0;
        brelse(bitmap_bh);
-       dquot_free_block(inode, *count-num);
+       dquot_free_block_nodirty(inode, *count-num);
+       mark_inode_dirty(inode);
        *count = num;
        return ret_block;
 
@@ -1428,8 +1429,10 @@ out:
        /*
         * Undo the block allocation
         */
-       if (!performed_allocation)
-               dquot_free_block(inode, *count);
+       if (!performed_allocation) {
+               dquot_free_block_nodirty(inode, *count);
+               mark_inode_dirty(inode);
+       }
        brelse(bitmap_bh);
        return 0;
 }