Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/msdosfs pull up rev 1.63 from trunk (requested by w...



details:   https://anonhg.NetBSD.org/src/rev/fffb020f3fbd
branches:  netbsd-1-4
changeset: 469595:fffb020f3fbd
user:      cgd <cgd%NetBSD.org@localhost>
date:      Mon Oct 18 05:05:25 1999 +0000

description:
pull up rev 1.63 from trunk (requested by wrstuden):
  In spec_close(), call the device's close routine with the vnode
  unlocked if the call might block. Force a non-blocking close if
  VXLOCK is set.  This eliminates a potential deadlock situation, and
  should eliminate the dirty buffers on reboot issue.

diffstat:

 sys/msdosfs/msdosfs_vfsops.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 9a91aec02eb2 -r fffb020f3fbd sys/msdosfs/msdosfs_vfsops.c
--- a/sys/msdosfs/msdosfs_vfsops.c      Mon Oct 18 05:05:19 1999 +0000
+++ b/sys/msdosfs/msdosfs_vfsops.c      Mon Oct 18 05:05:25 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msdosfs_vfsops.c,v 1.61 1999/03/07 13:57:20 tron Exp $ */
+/*     $NetBSD: msdosfs_vfsops.c,v 1.61.2.1 1999/10/18 05:05:25 cgd Exp $      */
 
 /*-
  * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -710,7 +710,9 @@
 error_exit:;
        if (bp)
                brelse(bp);
+       vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
        (void) VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p);
+       VOP_UNLOCK(devvp, 0);
        if (pmp) {
                if (pmp->pm_inusemap)
                        free(pmp->pm_inusemap, M_MSDOSFSFAT);
@@ -773,9 +775,10 @@
                    ((u_int *)vp->v_data)[1]);
        }
 #endif
+       vn_lock(pmp->pm_devvp, LK_EXCLUSIVE | LK_RETRY);
        error = VOP_CLOSE(pmp->pm_devvp,
            pmp->pm_flags & MSDOSFSMNT_RONLY ? FREAD : FREAD|FWRITE, NOCRED, p);
-       vrele(pmp->pm_devvp);
+       vput(pmp->pm_devvp);
        free(pmp->pm_inusemap, M_MSDOSFSFAT);
        free(pmp, M_MSDOSFSMNT);
        mp->mnt_data = (qaddr_t)0;



Home | Main Index | Thread Index | Old Index