lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250430010059.892632-3-vishal.moola@gmail.com>
Date: Tue, 29 Apr 2025 18:00:59 -0700
From: "Vishal Moola (Oracle)" <vishal.moola@...il.com>
To: linux-mm@...ck.org
Cc: linux-kernel@...r.kernel.org,
	Vivek Kasireddy <vivek.kasireddy@...el.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Vishal Moola (Oracle)" <vishal.moola@...il.com>
Subject: [PATCH 2/2] mm/gup: Remove page_folio() in memfd_pin_folios()

We can get the folio directly from the folio batch, so remove the
unnecessary page_folio() call.

Signed-off-by: Vishal Moola (Oracle) <vishal.moola@...il.com>
---
 mm/gup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/gup.c b/mm/gup.c
index 1fb8f3b9a493..795fd94f379d 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -3640,7 +3640,7 @@ long memfd_pin_folios(struct file *memfd, loff_t start, loff_t end,
 			}
 
 			for (i = 0; i < nr_found; i++) {
-				folio = page_folio(&fbatch.folios[i]->page);
+				folio = fbatch.folios[i];
 
 				if (try_grab_folio(folio, 1, FOLL_PIN)) {
 					folio_batch_release(&fbatch);
-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ