aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2017-01-10 21:41:28 +0000
committerMark Johnston <markj@FreeBSD.org>2017-01-10 21:41:28 +0000
commit90e17792c89650ad586ba763d15acaec74cb97b1 (patch)
treef721c981f754b57b918aa3026af38342ce339464
parent093cf246190c8348e8c80232c23f9659a10e941a (diff)
downloadsrc-90e17792c89650ad586ba763d15acaec74cb97b1.tar.gz
src-90e17792c89650ad586ba763d15acaec74cb97b1.zip
Do not set BIO_DONE if the BIO specifies a completion handler.
biowait() will otherwise race with completions of such BIOs. In-tree code only calls biowait() on BIOs that do not specify a handler, so this change should not have any functional impact. Reviewed by: mav MFC after: 1 month Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D9070
Notes
Notes: svn path=/head/; revision=311901
-rw-r--r--sys/kern/vfs_bio.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index b746eb93eb4d..c4498a191f55 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -3905,10 +3905,8 @@ biodone(struct bio *bp)
bp->bio_flags |= BIO_DONE;
wakeup(bp);
mtx_unlock(mtxp);
- } else {
- bp->bio_flags |= BIO_DONE;
+ } else
done(bp);
- }
}
/*