aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcos Paulo de Souza <marcos.souza.org@gmail.com>2019-02-10 12:22:51 -0500
committerJens Axboe <axboe@kernel.dk>2019-02-10 12:23:29 -0500
commit1e9364283764ac93b012739890a30d73e76396db (patch)
treeb13d26969eff5e02464209233920be2d41ea9115
parent7585d5082e17a6988a784010c1fbbc4055edcdb7 (diff)
blk-sysfs: Rework documention of __blk_release_queue
The Notes section of the comment was removed, because now blk_release_queue can only be executed from blk_cleanup_queue (being called when the q->kobj reaches zero), and also blk_init_queue was removed in a1ce35fa4985. Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--block/blk-sysfs.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 590d1ef2f961..94e1b052abbc 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -817,21 +817,16 @@ static void blk_free_queue_rcu(struct rcu_head *rcu_head)
817} 817}
818 818
819/** 819/**
820 * __blk_release_queue - release a request queue when it is no longer needed 820 * __blk_release_queue - release a request queue
821 * @work: pointer to the release_work member of the request queue to be released 821 * @work: pointer to the release_work member of the request queue to be released
822 * 822 *
823 * Description: 823 * Description:
824 * blk_release_queue is the counterpart of blk_init_queue(). It should be 824 * This function is called when a block device is being unregistered. The
825 * called when a request queue is being released; typically when a block 825 * process of releasing a request queue starts with blk_cleanup_queue, which
826 * device is being de-registered. Its primary task it to free the queue 826 * set the appropriate flags and then calls blk_put_queue, that decrements
827 * itself. 827 * the reference counter of the request queue. Once the reference counter
828 * 828 * of the request queue reaches zero, blk_release_queue is called to release
829 * Notes: 829 * all allocated resources of the request queue.
830 * The low level driver must have finished any outstanding requests first
831 * via blk_cleanup_queue().
832 *
833 * Although blk_release_queue() may be called with preemption disabled,
834 * __blk_release_queue() may sleep.
835 */ 830 */
836static void __blk_release_queue(struct work_struct *work) 831static void __blk_release_queue(struct work_struct *work)
837{ 832{