From 34116e973e3da3fcd4fc480e6d5da1c1c42dd6a6 Mon Sep 17 00:00:00 2001 From: dlg Date: Tue, 13 Jan 2015 02:24:26 +0000 Subject: [PATCH] pass the vnd xfer pointer to the tasks callback as part of the vndbuf allocation. luke-warm support and ok krw@ --- sys/uvm/uvm_swap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index 4418c716280..da3367f2605 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_swap.c,v 1.132 2014/12/23 04:47:30 tedu Exp $ */ +/* $OpenBSD: uvm_swap.c,v 1.133 2015/01/13 02:24:26 dlg Exp $ */ /* $NetBSD: uvm_swap.c,v 1.40 2000/11/17 11:39:39 mrg Exp $ */ /* @@ -192,6 +192,7 @@ struct vndxfer { struct vndbuf { struct buf vb_buf; + struct vndxfer *vb_vnx; struct task vb_task; }; @@ -1229,7 +1230,8 @@ sw_reg_strategy(struct swapdev *sdp, struct buf *bp, int bn) } /* patch it back to the vnx */ - task_set(&nbp->vb_task, sw_reg_iodone_internal, nbp, vnx); + nbp->vb_vnx = vnx; + task_set(&nbp->vb_task, sw_reg_iodone_internal, nbp, NULL); s = splbio(); if (vnx->vx_error != 0) { @@ -1313,10 +1315,10 @@ sw_reg_iodone(struct buf *bp) } void -sw_reg_iodone_internal(void *xvbp, void *xvnx) +sw_reg_iodone_internal(void *xvbp, void *null) { struct vndbuf *vbp = xvbp; - struct vndxfer *vnx = xvnx; + struct vndxfer *vnx = vbp->vb_vnx; struct buf *pbp = vnx->vx_bp; /* parent buffer */ struct swapdev *sdp = vnx->vx_sdp; int resid, s; -- 2.20.1