2003-07-20 10:18:33

by spam

[permalink] [raw]
Subject: 2.6.0-test1: autofs4 doesn't expire

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?

--
Dick Streefland //// De Bilt
[email protected] (@ @) The Netherlands
------------------------------oOO--(_)--OOo------------------


2003-07-20 12:46:27

by spam

[permalink] [raw]
Subject: Re: 2.6.0-test1: autofs4 doesn't expire

[email protected] (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
[email protected] (@ @) The Netherlands
------------------------------oOO--(_)--OOo------------------

2003-07-20 16:04:55

by Jeremy Fitzhardinge

[permalink] [raw]
Subject: Re: 2.6.0-test1: autofs4 doesn't expire

On Sun, 2003-07-20 at 06:00, Dick Streefland wrote:
> [email protected] (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:

Hm, that does look like it would upset autofs4. I'll take a look.

J