Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Operation handle_with_strategy() also needs the
details: https://anonhg.NetBSD.org/src/rev/433e93000fd6
branches: trunk
changeset: 995171:433e93000fd6
user: hannken <hannken%NetBSD.org@localhost>
date: Mon Dec 10 15:22:35 2018 +0000
description:
Operation handle_with_strategy() also needs the
fstrans_start_lazy() / fstrans_done() bracket.
PR kern/53624 (dom0 freeze on domU exit)
diffstat:
sys/dev/vnd.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (55 lines):
diff -r 136fca8b6e12 -r 433e93000fd6 sys/dev/vnd.c
--- a/sys/dev/vnd.c Mon Dec 10 15:08:23 2018 +0000
+++ b/sys/dev/vnd.c Mon Dec 10 15:22:35 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnd.c,v 1.269 2018/10/07 12:00:07 mlelstv Exp $ */
+/* $NetBSD: vnd.c,v 1.270 2018/12/10 15:22:35 hannken Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.269 2018/10/07 12:00:07 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.270 2018/12/10 15:22:35 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_vnd.h"
@@ -733,12 +733,17 @@
bp->b_bcount = obp->b_bcount;
BIO_COPYPRIO(bp, obp);
+ /* Make sure the request succeeds while suspending this fs. */
+ fstrans_start_lazy(vnd->sc_vp->v_mount);
+
/* Handle the request using the appropriate operations. */
if ((vnd->sc_flags & VNF_USE_VN_RDWR) == 0)
handle_with_strategy(vnd, obp, bp);
else
handle_with_rdwr(vnd, obp, bp);
+ fstrans_done(vnd->sc_vp->v_mount);
+
s = splbio();
continue;
@@ -804,9 +809,6 @@
bp->b_bcount);
#endif
- /* Make sure the request succeeds while suspending this fs. */
- fstrans_start_lazy(vp->v_mount);
-
/* Issue the read or write operation. */
bp->b_error =
vn_rdwr(doread ? UIO_READ : UIO_WRITE,
@@ -828,8 +830,6 @@
else
mutex_exit(vp->v_interlock);
- fstrans_done(vp->v_mount);
-
/* We need to increase the number of outputs on the vnode if
* there was any write to it. */
if (!doread) {
Home |
Main Index |
Thread Index |
Old Index