Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171649638
D59381.id185814.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D59381.id185814.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
@@ -2032,16 +2032,13 @@
static void
bq_insert(struct bufqueue *bq, struct buf *bp, bool unlock)
{
- struct bufdomain *bd;
-
if (bp->b_qindex != QUEUE_NONE)
panic("bq_insert: free buffer %p onto another queue?", bp);
- bd = bufdomain(bp);
if (bp->b_flags & B_AGE) {
/* Place this buf directly on the real queue. */
if (bq->bq_index == QUEUE_CLEAN)
- bq = bd->bd_cleanq;
+ bq = bufdomain(bp)->bd_cleanq;
BQ_LOCK(bq);
TAILQ_INSERT_HEAD(&bq->bq_queue, bp, b_freelist);
} else {
@@ -2054,12 +2051,15 @@
bp->b_subqueue = bq->bq_subqueue;
if (bp->b_qindex == QUEUE_CLEAN) {
+ struct bufdomain *bd;
+
/*
* 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.
*/
+ bd = bufdomain(bp);
if (bd->bd_wanted || (bq != bd->bd_cleanq &&
bq->bq_len >= bd->bd_lim)) {
if (unlock) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Sep 13, 10:51 AM (14 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38296304
Default Alt Text
D59381.id185814.diff (1 KB)
Attached To
Mode
D59381: buf: Avoid calling bufdomain() on newly initialized bufs
Attached
Detach File
Event Timeline
Log In to Comment