autofs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Leonardo Chiquitto <leonardo.lists@gmail.com>
Cc: autofs@linux.kernel.org, "Philip Ong Jr." <pongjr@gmail.com>
Subject: [PATCH 1/2] autofs-5.0.5 - fix next task list update
Date: Wed, 30 Mar 2011 13:49:30 +0800	[thread overview]
Message-ID: <20110330054930.22333.44353.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110330054620.22333.45008.stgit@localhost6.localdomain6>

When the state queue task manager transfered an automount point pending
task to its task queue for execution the state queue as mistakenly being
seen as empty when the completing task was the only task in the state
queue.
---

 CHANGELOG      |    1 +
 daemon/state.c |    8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index 347d7d7..a9687b7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -62,6 +62,7 @@
 - fix mountd vers retry.
 - fix expire race.
 - replace GPLv3 code.
+- fix next task list update.
 
 03/09/2009 autofs-5.0.5
 -----------------------
diff --git a/daemon/state.c b/daemon/state.c
index 38617c3..85587bd 100644
--- a/daemon/state.c
+++ b/daemon/state.c
@@ -1150,11 +1150,13 @@ remove:
 				next = list_entry((&task->pending)->next,
 							struct state_queue, pending);
 
-				list_del_init(&next->pending);
-				list_add_tail(&next->list, p);
-
 				list_del(&task->list);
 				free(task);
+
+				list_del_init(&next->pending);
+				list_add_tail(&next->list, head);
+				if (p == head)
+					p = head->next;
 			}
 
 			if (list_empty(head))

  reply	other threads:[~2011-03-30  5:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-30  5:49 [PATCH 0/2] Series for the non-expiring mounts problem Ian Kent
2011-03-30  5:49 ` Ian Kent [this message]
2011-03-30  5:49 ` [PATCH 2/2] autofs-5.0.5 - fix stale map read Ian Kent
2011-03-30 16:13 ` [PATCH 0/2] Series for the non-expiring mounts problem Leonardo Chiquitto
2011-04-29  2:52   ` Philip Ong Jr.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110330054930.22333.44353.stgit@localhost6.localdomain6 \
    --to=raven@themaw.net \
    --cc=autofs@linux.kernel.org \
    --cc=leonardo.lists@gmail.com \
    --cc=pongjr@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).