Skip to content

Commit

Permalink
blk-mq-tag: remove redundant check for 'data->hctx' being non-NULL
Browse files Browse the repository at this point in the history
We used to pass in NULL for hctx for reserved tags, but we don't
do that anymore. Hence the check for whether hctx is NULL or not
is now redundant, kill it.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: a642a158aec6 ("blk-mq-tag: cleanup the normal/reserved tag allocation")
Signed-off-by: Jens Axboe <axboe@fb.com>
  • Loading branch information
Jens Axboe committed Jan 19, 2017
1 parent 610d886 commit 8cecb07
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions block/blk-mq-tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,9 @@ unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data)
/*
* We're out of tags on this hardware queue, kick any
* pending IO submits before going to sleep waiting for
* some to complete. Note that hctx can be NULL here for
* reserved tag allocation.
* some to complete.
*/
if (data->hctx)
blk_mq_run_hw_queue(data->hctx, false);
blk_mq_run_hw_queue(data->hctx, false);

/*
* Retry tag allocation after running the hardware queue,
Expand Down

0 comments on commit 8cecb07

Please sign in to comment.