Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
[deliverable/linux.git] / fs / jfs / jfs_dtree.c
index 925871e9887baf83f8825cf9d6b04e297f945cbb..0e4623be70ceb6dcee419d1c392c8e92cf1bfac3 100644 (file)
@@ -381,10 +381,10 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot)
                 * It's time to move the inline table to an external
                 * page and begin to build the xtree
                 */
-               if (vfs_dq_alloc_block(ip, sbi->nbperpage))
+               if (dquot_alloc_block(ip, sbi->nbperpage))
                        goto clean_up;
                if (dbAlloc(ip, 0, sbi->nbperpage, &xaddr)) {
-                       vfs_dq_free_block(ip, sbi->nbperpage);
+                       dquot_free_block(ip, sbi->nbperpage);
                        goto clean_up;
                }
 
@@ -408,7 +408,7 @@ static u32 add_index(tid_t tid, struct inode *ip, s64 bn, int slot)
                        memcpy(&jfs_ip->i_dirtable, temp_table,
                               sizeof (temp_table));
                        dbFree(ip, xaddr, sbi->nbperpage);
-                       vfs_dq_free_block(ip, sbi->nbperpage);
+                       dquot_free_block(ip, sbi->nbperpage);
                        goto clean_up;
                }
                ip->i_size = PSIZE;
@@ -1027,10 +1027,9 @@ static int dtSplitUp(tid_t tid,
                        n = xlen;
 
                /* Allocate blocks to quota. */
-               if (vfs_dq_alloc_block(ip, n)) {
-                       rc = -EDQUOT;
+               rc = dquot_alloc_block(ip, n);
+               if (rc)
                        goto extendOut;
-               }
                quota_allocation += n;
 
                if ((rc = dbReAlloc(sbi->ipbmap, xaddr, (s64) xlen,
@@ -1308,7 +1307,7 @@ static int dtSplitUp(tid_t tid,
 
        /* Rollback quota allocation */
        if (rc && quota_allocation)
-               vfs_dq_free_block(ip, quota_allocation);
+               dquot_free_block(ip, quota_allocation);
 
       dtSplitUp_Exit:
 
@@ -1369,9 +1368,10 @@ static int dtSplitPage(tid_t tid, struct inode *ip, struct dtsplit * split,
                return -EIO;
 
        /* Allocate blocks to quota. */
-       if (vfs_dq_alloc_block(ip, lengthPXD(pxd))) {
+       rc = dquot_alloc_block(ip, lengthPXD(pxd));
+       if (rc) {
                release_metapage(rmp);
-               return -EDQUOT;
+               return rc;
        }
 
        jfs_info("dtSplitPage: ip:0x%p smp:0x%p rmp:0x%p", ip, smp, rmp);
@@ -1892,6 +1892,7 @@ static int dtSplitRoot(tid_t tid,
        struct dt_lock *dtlck;
        struct tlock *tlck;
        struct lv *lv;
+       int rc;
 
        /* get split root page */
        smp = split->mp;
@@ -1916,9 +1917,10 @@ static int dtSplitRoot(tid_t tid,
        rp = rmp->data;
 
        /* Allocate blocks to quota. */
-       if (vfs_dq_alloc_block(ip, lengthPXD(pxd))) {
+       rc = dquot_alloc_block(ip, lengthPXD(pxd));
+       if (rc) {
                release_metapage(rmp);
-               return -EDQUOT;
+               return rc;
        }
 
        BT_MARK_DIRTY(rmp, ip);
@@ -2287,7 +2289,7 @@ static int dtDeleteUp(tid_t tid, struct inode *ip,
        xlen = lengthPXD(&fp->header.self);
 
        /* Free quota allocation. */
-       vfs_dq_free_block(ip, xlen);
+       dquot_free_block(ip, xlen);
 
        /* free/invalidate its buffer page */
        discard_metapage(fmp);
@@ -2363,7 +2365,7 @@ static int dtDeleteUp(tid_t tid, struct inode *ip,
                                xlen = lengthPXD(&p->header.self);
 
                                /* Free quota allocation */
-                               vfs_dq_free_block(ip, xlen);
+                               dquot_free_block(ip, xlen);
 
                                /* free/invalidate its buffer page */
                                discard_metapage(mp);
This page took 0.025803 seconds and 5 git commands to generate.