Skip to content

Commit

Permalink
blk-mq: Delete blk_mq_has_free_tags() and blk_mq_can_queue()
Browse files Browse the repository at this point in the history
These functions are not referenced, so delete them.

Signed-off-by: John Garry <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
John Garry authored and axboe committed Nov 13, 2019
1 parent 6952a7f commit cb711b9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 16 deletions.
8 changes: 0 additions & 8 deletions block/blk-mq-tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
#include "blk-mq.h"
#include "blk-mq-tag.h"

bool blk_mq_has_free_tags(struct blk_mq_tags *tags)
{
if (!tags)
return true;

return sbitmap_any_bit_clear(&tags->bitmap_tags.sb);
}

/*
* If a previously inactive queue goes active, bump the active user count.
* We need to do this before try to allocate driver tag, then even if fail
Expand Down
1 change: 0 additions & 1 deletion block/blk-mq-tag.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ extern void blk_mq_free_tags(struct blk_mq_tags *tags);
extern unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data);
extern void blk_mq_put_tag(struct blk_mq_hw_ctx *hctx, struct blk_mq_tags *tags,
struct blk_mq_ctx *ctx, unsigned int tag);
extern bool blk_mq_has_free_tags(struct blk_mq_tags *tags);
extern int blk_mq_tag_update_depth(struct blk_mq_hw_ctx *hctx,
struct blk_mq_tags **tags,
unsigned int depth, bool can_grow);
Expand Down
6 changes: 0 additions & 6 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,6 @@ void blk_mq_wake_waiters(struct request_queue *q)
blk_mq_tag_wakeup_all(hctx->tags, true);
}

bool blk_mq_can_queue(struct blk_mq_hw_ctx *hctx)
{
return blk_mq_has_free_tags(hctx->tags);
}
EXPORT_SYMBOL(blk_mq_can_queue);

/*
* Only need start/end time stamping if we have iostat or
* blk stats enabled, or using an IO scheduler.
Expand Down
1 change: 0 additions & 1 deletion include/linux/blk-mq.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ void blk_mq_free_tag_set(struct blk_mq_tag_set *set);
void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule);

void blk_mq_free_request(struct request *rq);
bool blk_mq_can_queue(struct blk_mq_hw_ctx *);

bool blk_mq_queue_inflight(struct request_queue *q);

Expand Down

0 comments on commit cb711b9

Please sign in to comment.