Source-Changes-HG archive

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

[src/trunk]: src/sys/isofs/cd9660 Add calls to vn_lock() and VOP_UNLOCK() aro...



details:   https://anonhg.NetBSD.org/src/rev/8406f691016a
branches:  trunk
changeset: 480401:8406f691016a
user:      scw <scw%NetBSD.org@localhost>
date:      Tue Jan 11 09:04:50 2000 +0000

description:
Add calls to vn_lock() and VOP_UNLOCK() around the VOP_CLOSE() call
in iso_mountfs() to avoid a "panic: lockmgr: locking against myself"
when vrele() is called due to the mount having failed.

This fixes PR/9058.

diffstat:

 sys/isofs/cd9660/cd9660_vfsops.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r c5206ad6e903 -r 8406f691016a sys/isofs/cd9660/cd9660_vfsops.c
--- a/sys/isofs/cd9660/cd9660_vfsops.c  Tue Jan 11 08:24:14 2000 +0000
+++ b/sys/isofs/cd9660/cd9660_vfsops.c  Tue Jan 11 09:04:50 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cd9660_vfsops.c,v 1.42 1999/11/15 18:49:08 fvdl Exp $  */
+/*     $NetBSD: cd9660_vfsops.c,v 1.43 2000/01/11 09:04:50 scw Exp $   */
 
 /*-
  * Copyright (c) 1994
@@ -458,8 +458,11 @@
                brelse(pribp);
        if (supbp)
                brelse(supbp);
-       if (needclose)
+       if (needclose) {
+               vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
                (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, NOCRED, p);
+               VOP_UNLOCK(devvp, 0);
+       }
        if (isomp) {
                free((caddr_t)isomp, M_ISOFSMNT);
                mp->mnt_data = (qaddr_t)0;



Home | Main Index | Thread Index | Old Index