diff options
| author | riastradh <riastradh@NetBSD.org> | 2013-05-07 15:49:09 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2013-05-07 15:49:09 +0000 |
| commit | f4436fbc334ffc8f9d80e35bd5f3774589708f8f (patch) | |
| tree | c2d62e5d09a055116499d966cc39a720cd0b64f7 /sys | |
| parent | 4ecd52cbf0ea7d654a559ea734e8c3da6c851e80 (diff) | |
Set bp->b_resid to bp->b_bcount on error in swstrategy as required.
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/uvm/uvm_swap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/uvm/uvm_swap.c b/sys/uvm/uvm_swap.c index 02b3afd65f5..9b21911a6f6 100644 --- a/sys/uvm/uvm_swap.c +++ b/sys/uvm/uvm_swap.c @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_swap.c,v 1.162 2012/11/27 20:15:55 jakllsch Exp $ */ +/* $NetBSD: uvm_swap.c,v 1.163 2013/05/07 15:49:09 riastradh Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 2009 Matthew R. Green @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.162 2012/11/27 20:15:55 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.163 2013/05/07 15:49:09 riastradh Exp $"); #include "opt_uvmhist.h" #include "opt_compat_netbsd.h" @@ -1136,6 +1136,7 @@ swstrategy(struct buf *bp) mutex_exit(&uvm_swap_data_lock); if (sdp == NULL) { bp->b_error = EINVAL; + bp->b_resid = bp->b_bcount; biodone(bp); UVMHIST_LOG(pdhist, " failed to get swap device", 0, 0, 0, 0); return; |
