patch-2.4.0-test8 linux/fs/dquot.c
Next file: linux/fs/exec.c
Previous file: linux/fs/coda/upcall.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Tue Sep 5 13:59:18 2000
- Orig file:
v2.4.0-test7/linux/fs/dquot.c
- Orig date:
Thu Jul 27 17:38:01 2000
diff -u --recursive --new-file v2.4.0-test7/linux/fs/dquot.c linux/fs/dquot.c
@@ -1214,14 +1214,6 @@
lock_kernel();
/*
- * Find out if this filesystem uses i_blocks.
- */
- if (!inode->i_sb->s_blocksize)
- blocks = isize_to_blocks(inode->i_size, BLOCK_SIZE_BITS);
- else
- blocks = (inode->i_blocks >> 1);
-
- /*
* Build the transfer_from and transfer_to lists and check quotas to see
* if operation is permitted.
*/
@@ -1280,13 +1272,25 @@
* dqget() could block and so the first structure might got
* invalidated or locked...
*/
- if (!transfer_to[cnt]->dq_sb || !transfer_from[cnt]->dq_sb ||
- check_idq(transfer_to[cnt], 1) == NO_QUOTA ||
- check_bdq(transfer_to[cnt], blocks, 0) == NO_QUOTA) {
+ if (!transfer_to[cnt]->dq_sb || !transfer_from[cnt]->dq_sb) {
cnt++;
goto put_all;
}
}
+
+ /*
+ * Find out if this filesystem uses i_blocks.
+ */
+ if (!inode->i_sb->s_blocksize)
+ blocks = isize_to_blocks(inode->i_size, BLOCK_SIZE_BITS);
+ else
+ blocks = (inode->i_blocks >> 1);
+ for (cnt = 0; cnt < MAXQUOTAS; cnt++)
+ if (check_idq(transfer_to[cnt], 1) == NO_QUOTA ||
+ check_bdq(transfer_to[cnt], blocks, 0) == NO_QUOTA) {
+ cnt = MAXQUOTAS;
+ goto put_all;
+ }
if ((error = notify_change(dentry, iattr)))
goto put_all;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)