Module Name: src
Committed By: riastradh
Date: Tue May 7 15:49:09 UTC 2013
Modified Files:
src/sys/uvm: uvm_swap.c
Log Message:
Set bp->b_resid to bp->b_bcount on error in swstrategy as required.
To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/uvm/uvm_swap.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/uvm/uvm_swap.c
diff -u src/sys/uvm/uvm_swap.c:1.162 src/sys/uvm/uvm_swap.c:1.163
--- src/sys/uvm/uvm_swap.c:1.162 Tue Nov 27 20:15:55 2012
+++ src/sys/uvm/uvm_swap.c Tue May 7 15:49:09 2013
@@ -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;