Module Name: src
Committed By: hannken
Date: Mon Dec 10 15:22:35 UTC 2018
Modified Files:
src/sys/dev: vnd.c
Log Message:
Operation handle_with_strategy() also needs the
fstrans_start_lazy() / fstrans_done() bracket.
PR kern/53624 (dom0 freeze on domU exit)
To generate a diff of this commit:
cvs rdiff -u -r1.269 -r1.270 src/sys/dev/vnd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/vnd.c
diff -u src/sys/dev/vnd.c:1.269 src/sys/dev/vnd.c:1.270
--- src/sys/dev/vnd.c:1.269 Sun Oct 7 12:00:07 2018
+++ src/sys/dev/vnd.c Mon Dec 10 15:22:35 2018
@@ -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 @@ vndthread(void *arg)
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 @@ handle_with_rdwr(struct vnd_softc *vnd,
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 @@ handle_with_rdwr(struct vnd_softc *vnd,
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) {