Date: Thu, 8 May 2014 12:35:38 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r265674 - stable/9/sys/geom Message-ID: <201405081235.s48CZcV8094609@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Thu May 8 12:35:37 2014 New Revision: 265674 URL: http://svnweb.freebsd.org/changeset/base/265674 Log: MFC r256607, r259247: Fix passing uninitialized bio_resid argument to g_trace(). Modified: stable/9/sys/geom/geom_dev.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_dev.c ============================================================================== --- stable/9/sys/geom/geom_dev.c Thu May 8 12:28:24 2014 (r265673) +++ stable/9/sys/geom/geom_dev.c Thu May 8 12:35:37 2014 (r265674) @@ -489,16 +489,16 @@ g_dev_done(struct bio *bp2) sc = cp->private; bp = bp2->bio_parent; bp->bio_error = bp2->bio_error; - if (bp->bio_error != 0) { + bp->bio_completed = bp2->bio_completed; + bp->bio_resid = bp->bio_length - bp2->bio_completed; + if (bp2->bio_error != 0) { g_trace(G_T_BIO, "g_dev_done(%p) had error %d", - bp2, bp->bio_error); + bp2, bp2->bio_error); bp->bio_flags |= BIO_ERROR; } else { g_trace(G_T_BIO, "g_dev_done(%p/%p) resid %ld completed %jd", - bp2, bp, bp->bio_resid, (intmax_t)bp2->bio_completed); + bp2, bp, bp2->bio_resid, (intmax_t)bp2->bio_completed); } - bp->bio_resid = bp->bio_length - bp2->bio_completed; - bp->bio_completed = bp2->bio_completed; g_destroy_bio(bp2); destroy = 0; mtx_lock(&sc->sc_mtx);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405081235.s48CZcV8094609>