block: remove blk_freeze_queue()

No one use blk_freeze_queue(), so remove it and the obsolete comment.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20241031133723.303835-2-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Ming Lei 2024-10-31 21:37:17 +08:00 committed by Jens Axboe
parent f3d9bf0514
commit 54027869df
2 changed files with 2 additions and 23 deletions

View File

@ -161,30 +161,10 @@ int blk_mq_freeze_queue_wait_timeout(struct request_queue *q,
} }
EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_wait_timeout); EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_wait_timeout);
/*
* Guarantee no request is in use, so we can change any data structure of
* the queue afterward.
*/
void blk_freeze_queue(struct request_queue *q)
{
/*
* In the !blk_mq case we are only calling this to kill the
* q_usage_counter, otherwise this increases the freeze depth
* and waits for it to return to zero. For this reason there is
* no blk_unfreeze_queue(), and blk_freeze_queue() is not
* exported to drivers as the only user for unfreeze is blk_mq.
*/
blk_freeze_queue_start(q);
blk_mq_freeze_queue_wait(q);
}
void blk_mq_freeze_queue(struct request_queue *q) void blk_mq_freeze_queue(struct request_queue *q)
{ {
/* blk_freeze_queue_start(q);
* ...just an alias to keep freeze and unfreeze actions balanced blk_mq_freeze_queue_wait(q);
* in the blk_mq_* namespace
*/
blk_freeze_queue(q);
} }
EXPORT_SYMBOL_GPL(blk_mq_freeze_queue); EXPORT_SYMBOL_GPL(blk_mq_freeze_queue);

View File

@ -35,7 +35,6 @@ struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size,
gfp_t flags); gfp_t flags);
void blk_free_flush_queue(struct blk_flush_queue *q); void blk_free_flush_queue(struct blk_flush_queue *q);
void blk_freeze_queue(struct request_queue *q);
bool __blk_mq_unfreeze_queue(struct request_queue *q, bool force_atomic); bool __blk_mq_unfreeze_queue(struct request_queue *q, bool force_atomic);
bool blk_queue_start_drain(struct request_queue *q); bool blk_queue_start_drain(struct request_queue *q);
bool __blk_freeze_queue_start(struct request_queue *q); bool __blk_freeze_queue_start(struct request_queue *q);