lkml.org 
[lkml]   [2000]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] (was: [OOPS] dquot_transfer() - 2.4.0-test8)

On Mon, 11 Sep 2000, Martin Diehl wrote:

> transfer_to[cnt] is initialized to NODQUOT from the first loop
> (due to several continue's e.g.) when entering the second loop.
> Unfortunately I do not feel familiar enough to the quota code to
> provide a patch for this problem.

well, was a little bit to pessimistic. After some look at the code
I'm pretty sure the obvious check will solve it - succesfully tested
on local UP box.
Somebody with better knowledge of the logic behind dquot_transfer()
should check please, whether any special treatment is needed.

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/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.063 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site