diff options
author | phk <phk@FreeBSD.org> | 2003-04-14 08:08:17 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-04-14 08:08:17 +0000 |
commit | e27444e9974c97118445b1fef7aa490c2f53841c (patch) | |
tree | d0215edc86a4b1dc11c0f199fbdaefe049e8dd94 | |
parent | 1287890a35451e557da22133bd484fb13bfda696 (diff) | |
download | FreeBSD-src-e27444e9974c97118445b1fef7aa490c2f53841c.zip FreeBSD-src-e27444e9974c97118445b1fef7aa490c2f53841c.tar.gz |
Call biofinish() also when we get a malloc() failure.
-rw-r--r-- | sys/dev/ccd/ccd.c | 5 | ||||
-rw-r--r-- | sys/geom/geom_ccd.c | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c index f56a256..7dd43f9 100644 --- a/sys/dev/ccd/ccd.c +++ b/sys/dev/ccd/ccd.c @@ -578,10 +578,7 @@ ccdstart(struct ccd_s *cs, struct bio *bp) err = ccdbuffer(cbp, cs, bp, bn, addr, bcount); if (err) { printf("ccdbuffer error %d\n", err); - /* We're screwed */ - bp->bio_resid -= bcount; - bp->bio_error = ENOMEM; - bp->bio_flags |= BIO_ERROR; + biofinish(bp, NULL, err); return; } rcount = cbp[0]->cb_buf.bio_bcount; diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index f56a256..7dd43f9 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -578,10 +578,7 @@ ccdstart(struct ccd_s *cs, struct bio *bp) err = ccdbuffer(cbp, cs, bp, bn, addr, bcount); if (err) { printf("ccdbuffer error %d\n", err); - /* We're screwed */ - bp->bio_resid -= bcount; - bp->bio_error = ENOMEM; - bp->bio_flags |= BIO_ERROR; + biofinish(bp, NULL, err); return; } rcount = cbp[0]->cb_buf.bio_bcount; |