Re: umount() and NFS races in 2.4.26
From: viro
Date: Sat Jul 10 2004 - 19:33:53 EST
On Sat, Jul 10, 2004 at 04:38:48PM -0500, Trond Myklebust wrote:
> Known problem, but a fix is not trivial since the unlink() procedure
> does not take a nameidata structure argument (which would be needed in
> order to figure out which vfs_mount struct to mntget()).
Why the hell would you need a vfsmount for that? You want to duplicate
an active reference to superblock and you want it to be dropped later.
Which means atomic_inc(&sb->s_active) and kill_super(sb) resp.
NFS itself has a right to do that - we know that caller of ->unlink()
is holding a reference to vfsmount, so there's an active reference
that won't go away until nfs_unlink() is finished.
Filesystem code can hold active references to superblocks of given type,
provided that it takes care to drop them eventually on its own...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/