Re: Linux 2.2.18pre4

From: Martin Diehl (mdiehlcs@compuserve.de)
Date: Mon Sep 11 2000 - 16:16:57 EST


On Sun, 10 Sep 2000, Alan Cox wrote:

> 2.2.18pre4
> o Fix some of the dquot races (Jan Kara)

this appears to be basically the same patch as applied to 2.4.0t8 vs. t7
producing an Oops in dquot_transfer(). This issue can (at least) be
triggered by chown'ing a file on an (userquota && !groupquota) filesystem
from an user with unlimited quota to one who is restricted.
I've sent a fix for this to the diskquota-maintainer (mvw@planets.elm.net)
and l-k yesterday. With a few lines offset the same patch should be
applicable to 2.2.18pre4 - but haven't tested in this context!

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 majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:16 EST