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.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 27967f92e820..a177122a1b25 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -14,6 +14,7 @@
14#include <linux/time.h> 14#include <linux/time.h>
15#include <linux/capability.h> 15#include <linux/capability.h>
16#include <linux/fs.h> 16#include <linux/fs.h>
17#include <linux/slab.h>
17#include <linux/jbd.h> 18#include <linux/jbd.h>
18#include <linux/ext3_fs.h> 19#include <linux/ext3_fs.h>
19#include <linux/ext3_jbd.h> 20#include <linux/ext3_jbd.h>
@@ -676,7 +677,7 @@ void ext3_free_blocks(handle_t *handle, struct inode *inode,
676 } 677 }
677 ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks); 678 ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks);
678 if (dquot_freed_blocks) 679 if (dquot_freed_blocks)
679 vfs_dq_free_block(inode, dquot_freed_blocks); 680 dquot_free_block(inode, dquot_freed_blocks);
680 return; 681 return;
681} 682}
682 683
@@ -1502,8 +1503,9 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode,
1502 /* 1503 /*
1503 * Check quota for allocation of this block. 1504 * Check quota for allocation of this block.
1504 */ 1505 */
1505 if (vfs_dq_alloc_block(inode, num)) { 1506 err = dquot_alloc_block(inode, num);
1506 *errp = -EDQUOT; 1507 if (err) {
1508 *errp = err;
1507 return 0; 1509 return 0;
1508 } 1510 }
1509 1511
@@ -1713,7 +1715,7 @@ allocated:
1713 1715
1714 *errp = 0; 1716 *errp = 0;
1715 brelse(bitmap_bh); 1717 brelse(bitmap_bh);
1716 vfs_dq_free_block(inode, *count-num); 1718 dquot_free_block(inode, *count-num);
1717 *count = num; 1719 *count = num;
1718 return ret_block; 1720 return ret_block;
1719 1721
@@ -1728,7 +1730,7 @@ out:
1728 * Undo the block allocation 1730 * Undo the block allocation
1729 */ 1731 */
1730 if (!performed_allocation) 1732 if (!performed_allocation)
1731 vfs_dq_free_block(inode, *count); 1733 dquot_free_block(inode, *count);
1732 brelse(bitmap_bh); 1734 brelse(bitmap_bh);
1733 return 0; 1735 return 0;
1734} 1736}