@@ -329,6 +329,7 @@ struct bt_tags_iter_data {
busy_tag_iter_fn *fn;
void *data;
unsigned int flags;
+ struct request_queue *q;
};
#define BT_TAG_ITER_RESERVED (1 << 0)
@@ -357,9 +358,13 @@ static bool bt_tags_iter(struct sbitmap *bitmap, unsigned int bitnr, void *data)
if (!rq)
return true;
+ if (iter_data->q && iter_data->q != rq->q)
+ goto out;
+
if (!(iter_data->flags & BT_TAG_ITER_STARTED) ||
blk_mq_request_started(rq))
ret = iter_data->fn(rq, iter_data->data);
+out:
if (!iter_static_rqs)
blk_mq_put_rq_ref(rq);
return ret;