Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.dk/linux-block

* 'for-linus' of git://git.kernel.dk/linux-block:
block: Free queue resources at blk_release_queue()

+11 -7
+6 -7
block/blk-core.c
··· 348 348 EXPORT_SYMBOL(blk_put_queue); 349 349 350 350 /* 351 - * Note: If a driver supplied the queue lock, it should not zap that lock 352 - * unexpectedly as some queue cleanup components like elevator_exit() and 353 - * blk_throtl_exit() need queue lock. 351 + * Note: If a driver supplied the queue lock, it is disconnected 352 + * by this function. The actual state of the lock doesn't matter 353 + * here as the request_queue isn't accessible after this point 354 + * (QUEUE_FLAG_DEAD is set) and no other requests will be queued. 354 355 */ 355 356 void blk_cleanup_queue(struct request_queue *q) 356 357 { ··· 368 367 queue_flag_set_unlocked(QUEUE_FLAG_DEAD, q); 369 368 mutex_unlock(&q->sysfs_lock); 370 369 371 - if (q->elevator) 372 - elevator_exit(q->elevator); 373 - 374 - blk_throtl_exit(q); 370 + if (q->queue_lock != &q->__queue_lock) 371 + q->queue_lock = &q->__queue_lock; 375 372 376 373 blk_put_queue(q); 377 374 }
+5
block/blk-sysfs.c
··· 479 479 480 480 blk_sync_queue(q); 481 481 482 + if (q->elevator) 483 + elevator_exit(q->elevator); 484 + 485 + blk_throtl_exit(q); 486 + 482 487 if (rl->rq_pool) 483 488 mempool_destroy(rl->rq_pool); 484 489