All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,willy@infradead.org,akpm@linux-foundation.org
Subject: [merged mm-stable] mm-use-page_pgoff-in-more-places.patch removed from -mm tree
Date: Thu, 07 Nov 2024 14:38:36 -0800	[thread overview]
Message-ID: <20241107223837.4543EC4CECC@smtp.kernel.org> (raw)


The quilt patch titled
     Subject: mm: use page_pgoff() in more places
has been removed from the -mm tree.  Its filename was
     mm-use-page_pgoff-in-more-places.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: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: mm: use page_pgoff() in more places
Date: Sat, 5 Oct 2024 21:01:13 +0100

There are several places which currently open-code page_pgoff(), convert
them to call it.

Link: https://lkml.kernel.org/r/20241005200121.3231142-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/futex/core.c  |    2 +-
 mm/page_vma_mapped.c |    3 +--
 mm/rmap.c            |    4 +---
 3 files changed, 3 insertions(+), 6 deletions(-)

--- a/kernel/futex/core.c~mm-use-page_pgoff-in-more-places
+++ a/kernel/futex/core.c
@@ -399,7 +399,7 @@ again:
 
 		key->both.offset |= FUT_OFF_INODE; /* inode-based key */
 		key->shared.i_seq = get_inode_sequence_number(inode);
-		key->shared.pgoff = folio->index + folio_page_idx(folio, page);
+		key->shared.pgoff = page_pgoff(folio, page);
 		rcu_read_unlock();
 	}
 
--- a/mm/page_vma_mapped.c~mm-use-page_pgoff-in-more-places
+++ a/mm/page_vma_mapped.c
@@ -340,7 +340,6 @@ next_pte:
 unsigned long page_mapped_in_vma(struct page *page, struct vm_area_struct *vma)
 {
 	struct folio *folio = page_folio(page);
-	pgoff_t pgoff = folio->index + folio_page_idx(folio, page);
 	struct page_vma_mapped_walk pvmw = {
 		.pfn = page_to_pfn(page),
 		.nr_pages = 1,
@@ -348,7 +347,7 @@ unsigned long page_mapped_in_vma(struct
 		.flags = PVMW_SYNC,
 	};
 
-	pvmw.address = vma_address(vma, pgoff, 1);
+	pvmw.address = vma_address(vma, page_pgoff(folio, page), 1);
 	if (pvmw.address == -EFAULT)
 		goto out;
 	if (!page_vma_mapped_walk(&pvmw))
--- a/mm/rmap.c~mm-use-page_pgoff-in-more-places
+++ a/mm/rmap.c
@@ -774,7 +774,6 @@ static bool should_defer_flush(struct mm
 unsigned long page_address_in_vma(struct page *page, struct vm_area_struct *vma)
 {
 	struct folio *folio = page_folio(page);
-	pgoff_t pgoff;
 
 	if (folio_test_anon(folio)) {
 		struct anon_vma *page__anon_vma = folio_anon_vma(folio);
@@ -792,8 +791,7 @@ unsigned long page_address_in_vma(struct
 	}
 
 	/* The !page__anon_vma above handles KSM folios */
-	pgoff = folio->index + folio_page_idx(folio, page);
-	return vma_address(vma, pgoff, 1);
+	return vma_address(vma, page_pgoff(folio, page), 1);
 }
 
 /*
_

Patches currently in -mm which might be from willy@infradead.org are



                 reply	other threads:[~2024-11-07 22:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241107223837.4543EC4CECC@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.