]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/jfs/xattr.c
Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / fs / jfs / xattr.c
index fad364548bc9e3716b08dc0f6ca66a58d1f9b56c..1f594ab21895cb28c81f3b0238a434147d485198 100644 (file)
@@ -260,14 +260,14 @@ static int ea_write(struct inode *ip, struct jfs_ea_list *ealist, int size,
        nblocks = (size + (sb->s_blocksize - 1)) >> sb->s_blocksize_bits;
 
        /* Allocate new blocks to quota. */
-       if (vfs_dq_alloc_block(ip, nblocks)) {
-               return -EDQUOT;
-       }
+       rc = dquot_alloc_block(ip, nblocks);
+       if (rc)
+               return rc;
 
        rc = dbAlloc(ip, INOHINT(ip), nblocks, &blkno);
        if (rc) {
                /*Rollback quota allocation. */
-               vfs_dq_free_block(ip, nblocks);
+               dquot_free_block(ip, nblocks);
                return rc;
        }
 
@@ -332,7 +332,7 @@ static int ea_write(struct inode *ip, struct jfs_ea_list *ealist, int size,
 
       failed:
        /* Rollback quota allocation. */
-       vfs_dq_free_block(ip, nblocks);
+       dquot_free_block(ip, nblocks);
 
        dbFree(ip, blkno, nblocks);
        return rc;
@@ -538,7 +538,8 @@ static int ea_get(struct inode *inode, struct ea_buffer *ea_buf, int min_size)
 
        if (blocks_needed > current_blocks) {
                /* Allocate new blocks to quota. */
-               if (vfs_dq_alloc_block(inode, blocks_needed))
+               rc = dquot_alloc_block(inode, blocks_needed);
+               if (rc)
                        return -EDQUOT;
 
                quota_allocation = blocks_needed;
@@ -602,7 +603,7 @@ static int ea_get(struct inode *inode, struct ea_buffer *ea_buf, int min_size)
       clean_up:
        /* Rollback quota allocation */
        if (quota_allocation)
-               vfs_dq_free_block(inode, quota_allocation);
+               dquot_free_block(inode, quota_allocation);
 
        return (rc);
 }
@@ -677,7 +678,7 @@ static int ea_put(tid_t tid, struct inode *inode, struct ea_buffer *ea_buf,
 
        /* If old blocks exist, they must be removed from quota allocation. */
        if (old_blocks)
-               vfs_dq_free_block(inode, old_blocks);
+               dquot_free_block(inode, old_blocks);
 
        inode->i_ctime = CURRENT_TIME;