diff options
Diffstat (limited to 'fs/jfs/xattr.c')
| -rw-r--r-- | fs/jfs/xattr.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index fad364548bc9..1f594ab21895 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c | |||
| @@ -260,14 +260,14 @@ static int ea_write(struct inode *ip, struct jfs_ea_list *ealist, int size, | |||
| 260 | nblocks = (size + (sb->s_blocksize - 1)) >> sb->s_blocksize_bits; | 260 | nblocks = (size + (sb->s_blocksize - 1)) >> sb->s_blocksize_bits; |
| 261 | 261 | ||
| 262 | /* Allocate new blocks to quota. */ | 262 | /* Allocate new blocks to quota. */ |
| 263 | if (vfs_dq_alloc_block(ip, nblocks)) { | 263 | rc = dquot_alloc_block(ip, nblocks); |
| 264 | return -EDQUOT; | 264 | if (rc) |
| 265 | } | 265 | return rc; |
| 266 | 266 | ||
| 267 | rc = dbAlloc(ip, INOHINT(ip), nblocks, &blkno); | 267 | rc = dbAlloc(ip, INOHINT(ip), nblocks, &blkno); |
| 268 | if (rc) { | 268 | if (rc) { |
| 269 | /*Rollback quota allocation. */ | 269 | /*Rollback quota allocation. */ |
| 270 | vfs_dq_free_block(ip, nblocks); | 270 | dquot_free_block(ip, nblocks); |
| 271 | return rc; | 271 | return rc; |
| 272 | } | 272 | } |
| 273 | 273 | ||
| @@ -332,7 +332,7 @@ static int ea_write(struct inode *ip, struct jfs_ea_list *ealist, int size, | |||
| 332 | 332 | ||
| 333 | failed: | 333 | failed: |
| 334 | /* Rollback quota allocation. */ | 334 | /* Rollback quota allocation. */ |
| 335 | vfs_dq_free_block(ip, nblocks); | 335 | dquot_free_block(ip, nblocks); |
| 336 | 336 | ||
| 337 | dbFree(ip, blkno, nblocks); | 337 | dbFree(ip, blkno, nblocks); |
| 338 | return rc; | 338 | return rc; |
| @@ -538,7 +538,8 @@ static int ea_get(struct inode *inode, struct ea_buffer *ea_buf, int min_size) | |||
| 538 | 538 | ||
| 539 | if (blocks_needed > current_blocks) { | 539 | if (blocks_needed > current_blocks) { |
| 540 | /* Allocate new blocks to quota. */ | 540 | /* Allocate new blocks to quota. */ |
| 541 | if (vfs_dq_alloc_block(inode, blocks_needed)) | 541 | rc = dquot_alloc_block(inode, blocks_needed); |
| 542 | if (rc) | ||
| 542 | return -EDQUOT; | 543 | return -EDQUOT; |
| 543 | 544 | ||
| 544 | quota_allocation = blocks_needed; | 545 | quota_allocation = blocks_needed; |
| @@ -602,7 +603,7 @@ static int ea_get(struct inode *inode, struct ea_buffer *ea_buf, int min_size) | |||
| 602 | clean_up: | 603 | clean_up: |
| 603 | /* Rollback quota allocation */ | 604 | /* Rollback quota allocation */ |
| 604 | if (quota_allocation) | 605 | if (quota_allocation) |
| 605 | vfs_dq_free_block(inode, quota_allocation); | 606 | dquot_free_block(inode, quota_allocation); |
| 606 | 607 | ||
| 607 | return (rc); | 608 | return (rc); |
| 608 | } | 609 | } |
| @@ -677,7 +678,7 @@ static int ea_put(tid_t tid, struct inode *inode, struct ea_buffer *ea_buf, | |||
| 677 | 678 | ||
| 678 | /* If old blocks exist, they must be removed from quota allocation. */ | 679 | /* If old blocks exist, they must be removed from quota allocation. */ |
| 679 | if (old_blocks) | 680 | if (old_blocks) |
| 680 | vfs_dq_free_block(inode, old_blocks); | 681 | dquot_free_block(inode, old_blocks); |
| 681 | 682 | ||
| 682 | inode->i_ctime = CURRENT_TIME; | 683 | inode->i_ctime = CURRENT_TIME; |
| 683 | 684 | ||
