aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3/balloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext3/balloc.c')
-rw-r--r--fs/ext3/balloc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 27967f92e820..161da2d3f890 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -676,7 +676,7 @@ void ext3_free_blocks(handle_t *handle, struct inode *inode,
676 } 676 }
677 ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks); 677 ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks);
678 if (dquot_freed_blocks) 678 if (dquot_freed_blocks)
679 vfs_dq_free_block(inode, dquot_freed_blocks); 679 dquot_free_block(inode, dquot_freed_blocks);
680 return; 680 return;
681} 681}
682 682
@@ -1502,8 +1502,9 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode,
1502 /* 1502 /*
1503 * Check quota for allocation of this block. 1503 * Check quota for allocation of this block.
1504 */ 1504 */
1505 if (vfs_dq_alloc_block(inode, num)) { 1505 err = dquot_alloc_block(inode, num);
1506 *errp = -EDQUOT; 1506 if (err) {
1507 *errp = err;
1507 return 0; 1508 return 0;
1508 } 1509 }
1509 1510
@@ -1713,7 +1714,7 @@ allocated:
1713 1714
1714 *errp = 0; 1715 *errp = 0;
1715 brelse(bitmap_bh); 1716 brelse(bitmap_bh);
1716 vfs_dq_free_block(inode, *count-num); 1717 dquot_free_block(inode, *count-num);
1717 *count = num; 1718 *count = num;
1718 return ret_block; 1719 return ret_block;
1719 1720
@@ -1728,7 +1729,7 @@ out:
1728 * Undo the block allocation 1729 * Undo the block allocation
1729 */ 1730 */
1730 if (!performed_allocation) 1731 if (!performed_allocation)
1731 vfs_dq_free_block(inode, *count); 1732 dquot_free_block(inode, *count);
1732 brelse(bitmap_bh); 1733 brelse(bitmap_bh);
1733 return 0; 1734 return 0;
1734} 1735}