Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm Set bp->b_resid to bp->b_bcount on error in swstrate...



details:   https://anonhg.NetBSD.org/src/rev/6b3cf5ce2f02
branches:  trunk
changeset: 786687:6b3cf5ce2f02
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue May 07 15:49:09 2013 +0000

description:
Set bp->b_resid to bp->b_bcount on error in swstrategy as required.

diffstat:

 sys/uvm/uvm_swap.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r d8b175f957ae -r 6b3cf5ce2f02 sys/uvm/uvm_swap.c
--- a/sys/uvm/uvm_swap.c        Tue May 07 15:37:05 2013 +0000
+++ b/sys/uvm/uvm_swap.c        Tue May 07 15:49:09 2013 +0000
@@ -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 @@
        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;



Home | Main Index | Thread Index | Old Index