lkml.org 
[lkml]   [2002]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
SubjectQuota fixes
  Hello Alan,

two attached patches fix bugs in quota code. First one fixes
possible deadlock/inode list corruption (Chris Mason actually
fixed this bug), second one fixes possible quotafile corruption
on heavily loaded machines. Please apply.

Honza
--- linux/fs/dquot.c Mon, 15 Oct 2001 03:51:05 -0400 root (linux/i/40_dquot.c 1.1.2.1.3.1.1.1 644)
+++ linux/fs/dquot.c Mon, 15 Oct 2001 14:12:57 -0400 root (linux/i/40_dquot.c 1.1.2.1.3.1.1.1 644)
@@ -1246,6 +1246,8 @@
{
if (dquot->dq_dup_ref && dquot->dq_count - dquot->dq_dup_ref <= 1)
return 1;
+ if (dquot->dq_count <= 1 && dquot->dq_flags & DQ_MOD)
+ return 1;
return 0;
}
--- linux/fs/dquot.c Fri Feb 8 00:34:36 2002
+++ linux/fs/dquot.c Fri Feb 8 00:35:17 2002
@@ -804,9 +804,11 @@
{
uint tmp = DQTREEOFF;

- if (!dquot->dq_off) /* Even not allocated? */
- return;
down(&sb_dqopt(dquot->dq_sb)->dqio_sem);
+ if (!dquot->dq_off) { /* Even not allocated? */
+ up(&sb_dqopt(dquot->dq_sb)->dqio_sem);
+ return;
+ }
remove_tree(dquot, &tmp, 0);
up(&sb_dqopt(dquot->dq_sb)->dqio_sem);
}
\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.033 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site