Author: markj
Date: Tue Jan 10 21:41:28 2017
New Revision: 311901
URL: https://svnweb.freebsd.org/changeset/base/311901

Log:
  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

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c     Tue Jan 10 21:21:00 2017        (r311900)
+++ head/sys/kern/vfs_bio.c     Tue Jan 10 21:41:28 2017        (r311901)
@@ -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);
-       }
 }
 
 /*
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to