diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-08-25 09:12:35 +0000 |
commit | c7fc24dc4420057f103afe8fc64524ebc25c5d37 (patch) | |
tree | 3682407a599b8f9f03fc096298134cafba1c9b2f /fs/ext2/balloc.c | |
parent | 1d793fade8b063fde3cf275bf1a5c2d381292cd9 (diff) |
o Merge with Linux 2.1.116.
o New Newport console code.
o New G364 console code.
Diffstat (limited to 'fs/ext2/balloc.c')
-rw-r--r-- | fs/ext2/balloc.c | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index f4ee29211..40845df97 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -32,6 +32,7 @@ #include <linux/sched.h> #include <linux/string.h> #include <linux/locks.h> +#include <linux/quotaops.h> #include <asm/bitops.h> #include <asm/byteorder.h> @@ -321,8 +322,7 @@ do_more: "bit already cleared for block %lu", block); else { - if (sb->dq_op) - sb->dq_op->free_block(inode, fs_to_dq_blocks(1, sb->s_blocksize)); + DQUOT_FREE_BLOCK(sb, inode, 1); gdp->bg_free_blocks_count = cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count)+1); es->s_free_blocks_count = @@ -524,12 +524,11 @@ got_block: /* * Check quota for allocation of this block. */ - if (sb->dq_op) - if (sb->dq_op->alloc_block (inode, fs_to_dq_blocks(1, sb->s_blocksize))) { - unlock_super (sb); - *err = -EDQUOT; - return 0; - } + if(DQUOT_ALLOC_BLOCK(sb, inode, 1)) { + unlock_super(sb); + *err = -EDQUOT; + return 0; + } tmp = j + i * EXT2_BLOCKS_PER_GROUP(sb) + le32_to_cpu(es->s_first_data_block); @@ -544,8 +543,7 @@ got_block: if (ext2_set_bit (j, bh->b_data)) { ext2_warning (sb, "ext2_new_block", "bit already set for block %d", j); - if (sb->dq_op) - sb->dq_op->free_block(inode, fs_to_dq_blocks(1, sb->s_blocksize)); + DQUOT_FREE_BLOCK(sb, inode, 1); goto repeat; } @@ -566,12 +564,10 @@ got_block: for (k = 1; k < prealloc_goal && (j + k) < EXT2_BLOCKS_PER_GROUP(sb); k++) { - if (sb->dq_op) - if (sb->dq_op->alloc_block(inode, fs_to_dq_blocks(1, sb->s_blocksize))) - break; + if (DQUOT_PREALLOC_BLOCK(sb, inode, 1)) + break; if (ext2_set_bit (j + k, bh->b_data)) { - if (sb->dq_op) - sb->dq_op->free_block(inode, fs_to_dq_blocks(1, sb->s_blocksize)); + DQUOT_FREE_BLOCK(sb, inode, 1); break; } (*prealloc_count)++; |