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