On Tue, 12 Sep 2000, David Ford wrote:

> Please add 'Quota support causes OOPS'  Someone posted a patch but I don't
> have the reference offhand.  That patch appears to have fixed one person's
> problems.
[..]
> 
> >      * Oops in dquot_transfer (David Ford, Martin Diehl) (Jan Kara has a
> >        potential patch)
> 
> I believe this would be the referenced patch.

after getting some positive feedback on this patch I've just sent it to
Linus. Haven't CC'd to l-k as it was already there. I'm reposting it below
in case somebody is missing it. Alan did already include it in 2.2.18pre5
which had the same Oops introduced in 2.2.18pre4.

Martin

--- linux-2.4.0-test8/fs/dquot.c.orig   Mon Sep 11 01:42:56 2000
+++ linux-2.4.0-test8/fs/dquot.c        Mon Sep 11 02:12:04 2000
@@ -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] == NODQUOT)
+                       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; 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to