Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev in vndstrategy(), handle the underlying file being f...
details: https://anonhg.NetBSD.org/src/rev/d70b5f62d7da
branches: trunk
changeset: 515638:d70b5f62d7da
user: chs <chs%NetBSD.org@localhost>
date: Sun Sep 30 12:32:09 2001 +0000
description:
in vndstrategy(), handle the underlying file being force-unmounted.
diffstat:
sys/dev/vnd.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r d6038260f757 -r d70b5f62d7da sys/dev/vnd.c
--- a/sys/dev/vnd.c Sun Sep 30 11:50:05 2001 +0000
+++ b/sys/dev/vnd.c Sun Sep 30 12:32:09 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.72 2001/07/07 17:04:02 thorpej Exp $ */
+/* $NetBSD: vnd.c,v 1.73 2001/09/30 12:32:09 chs Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -374,6 +374,11 @@
/* ...and convert to a byte offset within the file. */
bn *= lp->d_secsize;
+ if (vnd->sc_vp->v_mount == NULL) {
+ bp->b_error = ENXIO;
+ bp->b_flags |= B_ERROR;
+ goto done;
+ }
bsize = vnd->sc_vp->v_mount->mnt_stat.f_iosize;
addr = bp->b_data;
flags = (bp->b_flags & (B_READ|B_ASYNC)) | B_CALL;
Home |
Main Index |
Thread Index |
Old Index