linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: spam@streefland.xs4all.nl (Dick Streefland)
To: linux-kernel@vger.kernel.org
Subject: Re: 2.6.0-test1: autofs4 doesn't expire
Date: Sun, 20 Jul 2003 13:00:23 -0000	[thread overview]
Message-ID: <1d60.3f1a9267.2bf5e@altium.nl> (raw)
In-Reply-To: <65b6.3f1a6fae.1d70b@altium.nl>

spam@streefland.xs4all.nl (Dick Streefland) wrote:
| In 2.6.0-test1, the autofs4 automounter doesn't expire mounts anymore,
| both NFS and CDROM mounts. It did work in my previous kernel, 2.5.72.
| When I try to unmount manually, I get "device is busy", although
| "fuser -m" doesn't report anything. I've also searched /proc/*/fd/,
| but there are no open files below the mount points.
| 
| Is anybody else seeing this? Any ideas what could be the cause?

Update: 2.5.75 is OK, so the problem was introduced in 2.6.0-test1.
I have not yet verified it, but I suspect that the addition of the
mntget() call is the cause:

==> fs/namespace.c <==
+/*
+ * Now, lookup_mnt increments the ref count before returning
+ * the vfsmount struct.
+ */
 struct vfsmount *lookup_mnt(struct vfsmount *mnt, struct dentry *dentry)
 {
 	struct list_head * head = mount_hashtable + hash(mnt, dentry);
 	struct list_head * tmp = head;
-	struct vfsmount *p;
+	struct vfsmount *p, *found = NULL;
 
+	spin_lock(&vfsmount_lock);
 	for (;;) {
 		tmp = tmp->next;
 		p = NULL;
 		if (tmp == head)
 			break;
 		p = list_entry(tmp, struct vfsmount, mnt_hash);
-		if (p->mnt_parent == mnt && p->mnt_mountpoint == dentry)
+		if (p->mnt_parent == mnt && p->mnt_mountpoint == dentry) {
+			found = mntget(p);
 			break;
+		}
 	}
-	return p;
+	spin_unlock(&vfsmount_lock);
+	return found;
 }

-- 
Dick Streefland                    ////               De Bilt
dick.streefland@xs4all.nl         (@ @)       The Netherlands
------------------------------oOO--(_)--OOo------------------


  reply	other threads:[~2003-07-20 12:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-20 10:32 Dick Streefland
2003-07-20 13:00 ` Dick Streefland [this message]
2003-07-20 16:19   ` Jeremy Fitzhardinge

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=1d60.3f1a9267.2bf5e@altium.nl \
    --to=spam@streefland.xs4all.nl \
    --cc=dick.streefland@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: 2.6.0-test1: autofs4 doesn'\''t expire' \
    /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

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).