diff options
Diffstat (limited to 'fs/ext2')
-rw-r--r-- | fs/ext2/balloc.c | 12 | ||||
-rw-r--r-- | fs/ext2/xattr.c | 10 |
2 files changed, 12 insertions, 10 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 7f8d2e5a7ea6..1d081f0cfec2 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c | |||
@@ -570,7 +570,7 @@ do_more: | |||
570 | error_return: | 570 | error_return: |
571 | brelse(bitmap_bh); | 571 | brelse(bitmap_bh); |
572 | release_blocks(sb, freed); | 572 | release_blocks(sb, freed); |
573 | vfs_dq_free_block(inode, freed); | 573 | dquot_free_block(inode, freed); |
574 | } | 574 | } |
575 | 575 | ||
576 | /** | 576 | /** |
@@ -1236,6 +1236,7 @@ ext2_fsblk_t ext2_new_blocks(struct inode *inode, ext2_fsblk_t goal, | |||
1236 | unsigned short windowsz = 0; | 1236 | unsigned short windowsz = 0; |
1237 | unsigned long ngroups; | 1237 | unsigned long ngroups; |
1238 | unsigned long num = *count; | 1238 | unsigned long num = *count; |
1239 | int ret; | ||
1239 | 1240 | ||
1240 | *errp = -ENOSPC; | 1241 | *errp = -ENOSPC; |
1241 | sb = inode->i_sb; | 1242 | sb = inode->i_sb; |
@@ -1247,8 +1248,9 @@ ext2_fsblk_t ext2_new_blocks(struct inode *inode, ext2_fsblk_t goal, | |||
1247 | /* | 1248 | /* |
1248 | * Check quota for allocation of this block. | 1249 | * Check quota for allocation of this block. |
1249 | */ | 1250 | */ |
1250 | if (vfs_dq_alloc_block(inode, num)) { | 1251 | ret = dquot_alloc_block(inode, num); |
1251 | *errp = -EDQUOT; | 1252 | if (ret) { |
1253 | *errp = ret; | ||
1252 | return 0; | 1254 | return 0; |
1253 | } | 1255 | } |
1254 | 1256 | ||
@@ -1409,7 +1411,7 @@ allocated: | |||
1409 | 1411 | ||
1410 | *errp = 0; | 1412 | *errp = 0; |
1411 | brelse(bitmap_bh); | 1413 | brelse(bitmap_bh); |
1412 | vfs_dq_free_block(inode, *count-num); | 1414 | dquot_free_block(inode, *count-num); |
1413 | *count = num; | 1415 | *count = num; |
1414 | return ret_block; | 1416 | return ret_block; |
1415 | 1417 | ||
@@ -1420,7 +1422,7 @@ out: | |||
1420 | * Undo the block allocation | 1422 | * Undo the block allocation |
1421 | */ | 1423 | */ |
1422 | if (!performed_allocation) | 1424 | if (!performed_allocation) |
1423 | vfs_dq_free_block(inode, *count); | 1425 | dquot_free_block(inode, *count); |
1424 | brelse(bitmap_bh); | 1426 | brelse(bitmap_bh); |
1425 | return 0; | 1427 | return 0; |
1426 | } | 1428 | } |
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c index 904f00642f84..e44dc92609be 100644 --- a/fs/ext2/xattr.c +++ b/fs/ext2/xattr.c | |||
@@ -644,8 +644,8 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh, | |||
644 | the inode. */ | 644 | the inode. */ |
645 | ea_bdebug(new_bh, "reusing block"); | 645 | ea_bdebug(new_bh, "reusing block"); |
646 | 646 | ||
647 | error = -EDQUOT; | 647 | error = dquot_alloc_block(inode, 1); |
648 | if (vfs_dq_alloc_block(inode, 1)) { | 648 | if (error) { |
649 | unlock_buffer(new_bh); | 649 | unlock_buffer(new_bh); |
650 | goto cleanup; | 650 | goto cleanup; |
651 | } | 651 | } |
@@ -702,7 +702,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh, | |||
702 | * as if nothing happened and cleanup the unused block */ | 702 | * as if nothing happened and cleanup the unused block */ |
703 | if (error && error != -ENOSPC) { | 703 | if (error && error != -ENOSPC) { |
704 | if (new_bh && new_bh != old_bh) | 704 | if (new_bh && new_bh != old_bh) |
705 | vfs_dq_free_block(inode, 1); | 705 | dquot_free_block(inode, 1); |
706 | goto cleanup; | 706 | goto cleanup; |
707 | } | 707 | } |
708 | } else | 708 | } else |
@@ -734,7 +734,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh, | |||
734 | le32_add_cpu(&HDR(old_bh)->h_refcount, -1); | 734 | le32_add_cpu(&HDR(old_bh)->h_refcount, -1); |
735 | if (ce) | 735 | if (ce) |
736 | mb_cache_entry_release(ce); | 736 | mb_cache_entry_release(ce); |
737 | vfs_dq_free_block(inode, 1); | 737 | dquot_free_block(inode, 1); |
738 | mark_buffer_dirty(old_bh); | 738 | mark_buffer_dirty(old_bh); |
739 | ea_bdebug(old_bh, "refcount now=%d", | 739 | ea_bdebug(old_bh, "refcount now=%d", |
740 | le32_to_cpu(HDR(old_bh)->h_refcount)); | 740 | le32_to_cpu(HDR(old_bh)->h_refcount)); |
@@ -797,7 +797,7 @@ ext2_xattr_delete_inode(struct inode *inode) | |||
797 | mark_buffer_dirty(bh); | 797 | mark_buffer_dirty(bh); |
798 | if (IS_SYNC(inode)) | 798 | if (IS_SYNC(inode)) |
799 | sync_dirty_buffer(bh); | 799 | sync_dirty_buffer(bh); |
800 | vfs_dq_free_block(inode, 1); | 800 | dquot_free_block(inode, 1); |
801 | } | 801 | } |
802 | EXT2_I(inode)->i_file_acl = 0; | 802 | EXT2_I(inode)->i_file_acl = 0; |
803 | 803 | ||