Thread (3 messages) 3 messages, 3 authors, 2021-12-23

Re: [PATCH] nvme/pci: fix queue_rqs list splitting

From: Christoph Hellwig <hch@lst.de>
Date: 2021-12-23 06:21:04

On Wed, Dec 22, 2021 at 01:41:59PM -0800, Keith Busch wrote:
 			/* detach 'req' and add to remainder list */
+			struct request *next = rq_list_next(req);
+
 			if (prev)
-				prev->rq_next = req->rq_next;
+				prev->rq_next = next;
+			else
+				*rqlist = next;
+
 			rq_list_add(&requeue_list, req);
-		} else {
+
+			if (prev)
+				req = prev;
+			else
+				req = next;
+		}
+
+		if (req) {
 			prev = req;
+			req = rq_list_next(req);
 		}
This hunk absolutely needs to go into a helper instead of being open
coded in a driver.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help