patch-2.1.102 linux/fs/ext2/balloc.c
Next file: linux/fs/ext2/ialloc.c
Previous file: linux/fs/buffer.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Fri May 8 22:55:06 1998
- Orig file:
v2.1.101/linux/fs/ext2/balloc.c
- Orig date:
Fri May 8 23:14:52 1998
diff -u --recursive --new-file v2.1.101/linux/fs/ext2/balloc.c linux/fs/ext2/balloc.c
@@ -524,7 +524,11 @@
/*
* Check quota for allocation of this block.
*/
- DQUOT_ALLOC_BLOCK(sb, inode, 1);
+ 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);
@@ -560,7 +564,8 @@
for (k = 1;
k < prealloc_goal && (j + k) < EXT2_BLOCKS_PER_GROUP(sb);
k++) {
- DQUOT_PREALLOC_BLOCK(sb, inode, 1);
+ if (DQUOT_PREALLOC_BLOCK(sb, inode, 1))
+ break;
if (ext2_set_bit (j + k, bh->b_data)) {
DQUOT_FREE_BLOCK(sb, inode, 1);
break;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov