Module Name: src Committed By: mlelstv Date: Tue Aug 18 21:24:19 UTC 2015
Modified Files: src/sys/dev: cgd.c Log Message: restore deleted lines that kept buffer fields resid,count and error consistent. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/dev/cgd.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/cgd.c diff -u src/sys/dev/cgd.c:1.99 src/sys/dev/cgd.c:1.100 --- src/sys/dev/cgd.c:1.99 Sun Aug 16 18:00:03 2015 +++ src/sys/dev/cgd.c Tue Aug 18 21:24:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.99 2015/08/16 18:00:03 mlelstv Exp $ */ +/* $NetBSD: cgd.c,v 1.100 2015/08/18 21:24:19 mlelstv Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.99 2015/08/16 18:00:03 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.100 2015/08/18 21:24:19 mlelstv Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -477,6 +477,11 @@ cgdiodone(struct buf *nbp) putiobuf(nbp); + /* Request is complete for whatever reason */ + obp->b_resid = 0; + if (obp->b_error != 0) + obp->b_resid = obp->b_bcount; + dk_done(dksc, obp); }