Messages in this thread Patches in this message | | | Date | Mon, 25 Feb 2002 20:37:08 +0100 | From | Jan Kara <> | Subject | Quota 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); } | |