Re: mnt_count accounting broken

From: Tigran Aivazian (tigran@veritas.com)
Date: Fri May 05 2000 - 12:59:56 EST


On Fri, 5 May 2000, Alexander Viro wrote:
> On Fri, 5 May 2000, Tigran Aivazian wrote:
>
> > Hi,
> >
> > Ok, here is the promised "consistent reproducible picture" and, btw,
> > the "-o noatime" observation seemed to be bogus (i.e. some small changes
> > I made distorted the picture). Below is a session with a clean
> > 2.3.99-pre7-5 (with a tiny debug patch below):
> >
> > # mount -t ramfs none /mnt/m3
> > # cd /mnt/m3
> > # touch new
> > # l
> > total 0
> > -rw-r--r-- 1 root root 0 May 5 17:33 new
> > # cd
> > # umount /mnt/m3
> > C: count!=2 (3)
> > umount: /mnt/m3: device is busy
>
> ACK. It's not ->mnt_count, it's an extra dentry reference that holds the
> ramfs objects in dcache. Solution:
> ramfs_umount_begin() that would do equivalent of rm -rf.
> With the changes I'm doing right now we will catch busy filesystems
> without dentry scan, thus we are safe here.
> Linus, are you OK with such variant?
> Cheers,
> Al

but, hang on a second, what about the ->mnt_count case? I said (see
subject of email) mnt_count is preventing the umount not just
d_active_references() thing (see the rest of my log).

Ok, I see why those extra dget/dputs are needed, thanks for explanation.
But the above explains only the count and not the mnt_count stuff.

Thanks,
Tigran

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:18 EST