On Thu, Aug 28, 2025 at 12:01:34AM +0200, David Hildenbrand wrote: > 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. > > Reviewed-by: Bart Van Assche <bvanass...@acm.org> > Cc: Doug Gilbert <dgilb...@interlog.com> > Cc: "James E.J. Bottomley" <james.bottom...@hansenpartnership.com> > Cc: "Martin K. Petersen" <martin.peter...@oracle.com> > Signed-off-by: David Hildenbrand <da...@redhat.com>
LGTM, so: Reviewed-by: Lorenzo Stoakes <lorenzo.stoa...@oracle.com> > --- > drivers/scsi/sg.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c > index 3c02a5f7b5f39..4c62c597c7be9 100644 > --- a/drivers/scsi/sg.c > +++ b/drivers/scsi/sg.c > @@ -1235,8 +1235,7 @@ sg_vma_fault(struct vm_fault *vmf) > len = vma->vm_end - sa; > len = (len < length) ? len : length; > if (offset < len) { > - struct page *page = nth_page(rsv_schp->pages[k], > - offset >> PAGE_SHIFT); > + struct page *page = rsv_schp->pages[k] + (offset >> > PAGE_SHIFT); > get_page(page); /* increment page count */ > vmf->page = page; > return 0; /* success */ > -- > 2.50.1 >