Avoid referencing a removed (and freed) queue entry. This partially reverts

revision 1.101 (which did not introduce the bug but made it harder to fix)

PR:		misc/40363
Submitted by:	David Dunham <dwdunham@isilon.com>
MFC after:	2 weeks
This commit is contained in:
Dag-Erling Smørgrav 2002-10-06 17:43:04 +00:00
parent cfde77fbdf
commit 695df15da2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104573

View File

@ -1813,7 +1813,7 @@ static void
markit(void)
{
struct filed *f;
dq_t q;
dq_t q, next;
now = time((time_t *)NULL);
MarkSeq += TIMERINTVL;
@ -1834,7 +1834,9 @@ markit(void)
}
/* Walk the dead queue, and see if we should signal somebody. */
TAILQ_FOREACH(q, &deadq_head, dq_entries) {
for (q = TAILQ_FIRST(&deadq_head); q != NULL; q = next) {
next = TAILQ_NEXT(q, dq_entries);
switch (q->dq_timeout) {
case 0:
/* Already signalled once, try harder now. */