Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157001724
D56948.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
865 B
Referenced Files
None
Subscribers
None
D56948.diff
View Options
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -2053,22 +2053,26 @@
bp->b_qindex = bq->bq_index;
bp->b_subqueue = bq->bq_subqueue;
- /*
- * Unlock before we notify so that we don't wakeup a waiter that
- * fails a trylock on the buf and sleeps again.
- */
- if (unlock)
- BUF_UNLOCK(bp);
-
if (bp->b_qindex == QUEUE_CLEAN) {
/*
* Flush the per-cpu queue and notify any waiters.
+ *
+ * Unlock before we notify so that we don't wakeup a waiter
+ * that fails a trylock on the buf and sleeps again.
*/
if (bd->bd_wanted || (bq != bd->bd_cleanq &&
- bq->bq_len >= bd->bd_lim))
+ bq->bq_len >= bd->bd_lim)) {
+ if (unlock) {
+ BUF_UNLOCK(bp);
+ unlock = false;
+ }
bd_flush(bd, bq);
+ }
}
BQ_UNLOCK(bq);
+
+ if (unlock)
+ BUF_UNLOCK(bp);
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, May 18, 9:40 PM (17 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32984988
Default Alt Text
D56948.diff (865 B)
Attached To
Mode
D56948: bq_insert: delay the BUF_UNLOCK if not bd_flush()ing
Attached
Detach File
Event Timeline
Log In to Comment