]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/ext3/balloc.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[mv-sheeva.git] / fs / ext3 / balloc.c
index 27967f92e8201ca3ce689ff1491a6632319dfc66..a177122a1b2584170d609b0282bf1fd094bd86b9 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/time.h>
 #include <linux/capability.h>
 #include <linux/fs.h>
+#include <linux/slab.h>
 #include <linux/jbd.h>
 #include <linux/ext3_fs.h>
 #include <linux/ext3_jbd.h>
@@ -676,7 +677,7 @@ void ext3_free_blocks(handle_t *handle, struct inode *inode,
        }
        ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks);
        if (dquot_freed_blocks)
-               vfs_dq_free_block(inode, dquot_freed_blocks);
+               dquot_free_block(inode, dquot_freed_blocks);
        return;
 }
 
@@ -1502,8 +1503,9 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode,
        /*
         * Check quota for allocation of this block.
         */
-       if (vfs_dq_alloc_block(inode, num)) {
-               *errp = -EDQUOT;
+       err = dquot_alloc_block(inode, num);
+       if (err) {
+               *errp = err;
                return 0;
        }
 
@@ -1713,7 +1715,7 @@ allocated:
 
        *errp = 0;
        brelse(bitmap_bh);
-       vfs_dq_free_block(inode, *count-num);
+       dquot_free_block(inode, *count-num);
        *count = num;
        return ret_block;
 
@@ -1728,7 +1730,7 @@ out:
         * Undo the block allocation
         */
        if (!performed_allocation)
-               vfs_dq_free_block(inode, *count);
+               dquot_free_block(inode, *count);
        brelse(bitmap_bh);
        return 0;
 }