Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/nfs pull up rev 1.84 from trunk (requested by fvdl):



details:   https://anonhg.NetBSD.org/src/rev/6988461c0bf8
branches:  netbsd-1-4
changeset: 469662:6988461c0bf8
user:      cgd <cgd%NetBSD.org@localhost>
date:      Fri Nov 05 07:13:25 1999 +0000

description:
pull up rev 1.84 from trunk (requested by fvdl):
  Avoid a panic when forcibly unmounting a hung NFS mount, e.g. at
  reboot.

diffstat:

 sys/nfs/nfs_vfsops.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r 7b3ef6323415 -r 6988461c0bf8 sys/nfs/nfs_vfsops.c
--- a/sys/nfs/nfs_vfsops.c      Fri Nov 05 07:13:16 1999 +0000
+++ b/sys/nfs/nfs_vfsops.c      Fri Nov 05 07:13:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nfs_vfsops.c,v 1.83 1999/03/06 05:34:41 fair Exp $     */
+/*     $NetBSD: nfs_vfsops.c,v 1.83.2.1 1999/11/05 07:13:25 cgd Exp $  */
 
 /*
  * Copyright (c) 1989, 1993, 1995
@@ -772,11 +772,11 @@
        }
 
        /*
-        * We are now committed to the unmount.
-        * For NQNFS, let the server daemon free the nfsmount structure.
+        * We are now committed to the unmount; mark the mount structure
+        * as doomed so that any sleepers kicked awake by nfs_disconnect
+        * will go away cleanly.
         */
-       if (nmp->nm_flag & (NFSMNT_NQNFS | NFSMNT_KERB))
-               nmp->nm_iflag |= NFSMNT_DISMNT;
+       nmp->nm_iflag |= NFSMNT_DISMNT;
 
        /*
         * There are two reference counts to get rid of here.
@@ -787,6 +787,9 @@
        nfs_disconnect(nmp);
        m_freem(nmp->nm_nam);
 
+       /*
+        * For NQNFS, let the server daemon free the nfsmount structure.
+        */
        if ((nmp->nm_flag & (NFSMNT_NQNFS | NFSMNT_KERB)) == 0)
                free((caddr_t)nmp, M_NFSMNT);
        return (0);



Home | Main Index | Thread Index | Old Index