patch-2.4.0-test9 linux/fs/dquot.c

Next file: linux/fs/ext2/balloc.c
Previous file: linux/fs/dnotify.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test8/linux/fs/dquot.c linux/fs/dquot.c
@@ -1285,12 +1285,15 @@
 		blocks = isize_to_blocks(inode->i_size, BLOCK_SIZE_BITS);
 	else
 		blocks = (inode->i_blocks >> 1);
-	for (cnt = 0; cnt < MAXQUOTAS; cnt++)
+	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
+		if (!transfer_to[cnt])
+			continue;
 		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)