Skip to contentSkip to conversation

scsi-scsi_lib-drop-nth_page-usage-within-sg-entry.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 21, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: scsi: scsi_lib: drop nth_page() usage within SG entry
has been removed from the -mm tree. Its filename was
scsi-scsi_lib-drop-nth_page-usage-within-sg-entry.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: David Hildenbrand <[email protected]>
Subject: scsi: scsi_lib: drop nth_page() usage within SG entry
Date: Mon, 1 Sep 2025 17:03:51 +0200

It's no longer required to use nth_page() when iterating pages within a single SG entry, so let's drop the nth_page() usage.

---

 drivers/scsi/scsi_lib.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/scsi_lib.c renamed from drivers/scsi/scsi_lib.c~scsi-scsi_lib-drop-nth_page-usage-within-sg-entry +1 -2
@@ -3148,8 +3148,7 @@ void *scsi_kmap_atomic_sg(struct scatter
 	/* Offset starting from the beginning of first page in this sg-entry */
 	*offset = *offset - len_complete + sg->offset;
 
-	/* Assumption: contiguous pages can be accessed as "page + i" */
-	page = nth_page(sg_page(sg), (*offset >> PAGE_SHIFT));
+	page = sg_page(sg) + (*offset >> PAGE_SHIFT);
 	*offset &= ~PAGE_MASK;
 
 	/* Bytes in this sg-entry from *offset to the end of the page */

_

Patches currently in -mm which might be from [email protected] are