summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-09-13 11:00:48 +0000
committerphk <phk@FreeBSD.org>2002-09-13 11:00:48 +0000
commit4e012cc1d4cadfedb14e953bbc71f695e9a03782 (patch)
treefdcd8b8d2c217961c5e78ba334dd1464094b446a /sys
parent0687f90dba5d628b9465c4c91626aec59638c29e (diff)
downloadFreeBSD-src-4e012cc1d4cadfedb14e953bbc71f695e9a03782.zip
FreeBSD-src-4e012cc1d4cadfedb14e953bbc71f695e9a03782.tar.gz
Make biodone() default to wakeup() on the struct bio if no bio_done
method was specified.
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/bio.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/sys/bio.h b/sys/sys/bio.h
index d5a9b70..7f2d64b 100644
--- a/sys/sys/bio.h
+++ b/sys/sys/bio.h
@@ -111,7 +111,10 @@ static __inline__ void
biodone(struct bio *bp)
{
bp->bio_flags |= BIO_DONE;
- bp->bio_done(bp);
+ if (bp->bio_done != NULL)
+ bp->bio_done(bp);
+ else
+ wakeup(bp);
}
#ifndef _DEVICESTAT_H
OpenPOWER on IntegriCloud