Merge tag 'nvme-6.9-2024-03-21' of git://git.infradead.org/nvme into block-6.9
[sfrench/cifs-2.6.git] / drivers / nvme / host / tcp.c
index 34a882b2ec53d8e8f626717f9995c4d6d1cb25dd..fdbcdcedcee99f064cc7258d22b7fe737d285eda 100644 (file)
@@ -1352,7 +1352,6 @@ static int nvme_tcp_alloc_async_req(struct nvme_tcp_ctrl *ctrl)
 
 static void nvme_tcp_free_queue(struct nvme_ctrl *nctrl, int qid)
 {
-       struct page *page;
        struct nvme_tcp_ctrl *ctrl = to_tcp_ctrl(nctrl);
        struct nvme_tcp_queue *queue = &ctrl->queues[qid];
        unsigned int noreclaim_flag;
@@ -1363,11 +1362,7 @@ static void nvme_tcp_free_queue(struct nvme_ctrl *nctrl, int qid)
        if (queue->hdr_digest || queue->data_digest)
                nvme_tcp_free_crypto(queue);
 
-       if (queue->pf_cache.va) {
-               page = virt_to_head_page(queue->pf_cache.va);
-               __page_frag_cache_drain(page, queue->pf_cache.pagecnt_bias);
-               queue->pf_cache.va = NULL;
-       }
+       page_frag_cache_drain(&queue->pf_cache);
 
        noreclaim_flag = memalloc_noreclaim_save();
        /* ->sock will be released by fput() */