Skip to content

Commit 5402786

Browse files
Ming Leiaxboe
authored andcommitted
block: remove blk_freeze_queue()
No one use blk_freeze_queue(), so remove it and the obsolete comment. Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Ming Lei <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent f3d9bf0 commit 5402786

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

block/blk-mq.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -161,31 +161,11 @@ int blk_mq_freeze_queue_wait_timeout(struct request_queue *q,
161161
}
162162
EXPORT_SYMBOL_GPL(blk_mq_freeze_queue_wait_timeout);
163163

164-
/*
165-
* Guarantee no request is in use, so we can change any data structure of
166-
* the queue afterward.
167-
*/
168-
void blk_freeze_queue(struct request_queue *q)
164+
void blk_mq_freeze_queue(struct request_queue *q)
169165
{
170-
/*
171-
* In the !blk_mq case we are only calling this to kill the
172-
* q_usage_counter, otherwise this increases the freeze depth
173-
* and waits for it to return to zero. For this reason there is
174-
* no blk_unfreeze_queue(), and blk_freeze_queue() is not
175-
* exported to drivers as the only user for unfreeze is blk_mq.
176-
*/
177166
blk_freeze_queue_start(q);
178167
blk_mq_freeze_queue_wait(q);
179168
}
180-
181-
void blk_mq_freeze_queue(struct request_queue *q)
182-
{
183-
/*
184-
* ...just an alias to keep freeze and unfreeze actions balanced
185-
* in the blk_mq_* namespace
186-
*/
187-
blk_freeze_queue(q);
188-
}
189169
EXPORT_SYMBOL_GPL(blk_mq_freeze_queue);
190170

191171
bool __blk_mq_unfreeze_queue(struct request_queue *q, bool force_atomic)

block/blk.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size,
3535
gfp_t flags);
3636
void blk_free_flush_queue(struct blk_flush_queue *q);
3737

38-
void blk_freeze_queue(struct request_queue *q);
3938
bool __blk_mq_unfreeze_queue(struct request_queue *q, bool force_atomic);
4039
bool blk_queue_start_drain(struct request_queue *q);
4140
bool __blk_freeze_queue_start(struct request_queue *q);

0 commit comments

Comments
 (0)