Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Jan 2017 21:41:29 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r311901 - head/sys/kern
Message-ID:  <201701102141.v0ALfTqW095223@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
-	}
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701102141.v0ALfTqW095223>