diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-ioc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-ioc.c b/block/blk-ioc.c index 27a06e0..7490b6d 100644 --- a/block/blk-ioc.c +++ b/block/blk-ioc.c @@ -204,7 +204,9 @@ void put_io_context(struct io_context *ioc, struct request_queue *locked_q) spin_unlock(last_q->queue_lock); last_q = NULL; - if (!spin_trylock(this_q->queue_lock)) + /* spin_trylock() always successes in UP case */ + if (this_q != locked_q && + !spin_trylock(this_q->queue_lock)) break; last_q = this_q; continue; |