Merge some cs42l42 patches into asoc-5.15
[linux-2.6-microblaze.git] / block / blk-mq.h
index 4b1ca7b..d08779f 100644 (file)
@@ -302,6 +302,17 @@ static inline struct blk_plug *blk_mq_plug(struct request_queue *q,
        return NULL;
 }
 
+/* Free all requests on the list */
+static inline void blk_mq_free_requests(struct list_head *list)
+{
+       while (!list_empty(list)) {
+               struct request *rq = list_entry_rq(list->next);
+
+               list_del_init(&rq->queuelist);
+               blk_mq_free_request(rq);
+       }
+}
+
 /*
  * For shared tag users, we track the number of currently active users
  * and attempt to provide a fair share of the tag depth for each of them.