On Wed, Sep 17, H. Peter Anvin wrote:

> Okay... let me ask this so I get it straight...
> 
> Has anyone seen this (busy inodes after stopping the automounter) using 
> autofs v3 kernel module and daemon?

I'm not sure, but everyone who has seen this should fiddle this patch
into the kernel and see how it goes.
The whole thing started very recently (post 2.4.21) for us.

This patch is untested, any feedback appreciated.

        This patch will hopefully fix the "VFS: Busy inodes after unmount.
        Self-destruct in 5 seconds" oopses generated by autofs+nfs.

diff -u -r linux-2.4.21/fs/nfs/inode.c smp/fs/nfs/inode.c
--- linux-2.4.21/fs/nfs/inode.c 2003-09-17 17:51:53.000000000 +0200
+++ smp/fs/nfs/inode.c  2003-09-17 21:24:57.000000000 +0200
@@ -976,9 +976,19 @@
 
 int nfs_release(struct inode *inode, struct file *filp)
 {
+       struct dentry *dentry;
        struct rpc_cred *cred;
 
        lock_kernel();
+
+       /* Do the silly unlink here as long as we still have a reference   
+        * on the vfsmount. Otherwise the unlink cache may hold a reference
+        * to the parent dentry across umount() calls. */
+       if ((dentry = filp->f_dentry) && (dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
+               /* Just trigger the NFS call */
+               nfs_complete_unlink(dentry);
+       }
+
        cred = nfs_file_cred(filp);
        if (cred)
                put_rpccred(cred);



-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
_______________________________________________
autofs mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to