git: fe5ce9eb024b - main - linuxkpi: Move `put_page()` closer to `get_page()`
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 12 May 2025 17:46:49 UTC
The branch main has been updated by dumbbell:
URL: https://cgit.FreeBSD.org/src/commit/?id=fe5ce9eb024b46702d2c75df16699b7f35f616ae
commit fe5ce9eb024b46702d2c75df16699b7f35f616ae
Author: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2025-04-13 11:04:05 +0000
Commit: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2025-05-12 17:08:02 +0000
linuxkpi: Move `put_page()` closer to `get_page()`
This is to prepare a future change to the implementation and make it
easier to review.
Reviewed by: emaste, markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D49811
---
sys/compat/linuxkpi/common/include/linux/mm.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h
index 17b7a4137b7a..194baae1d2a4 100644
--- a/sys/compat/linuxkpi/common/include/linux/mm.h
+++ b/sys/compat/linuxkpi/common/include/linux/mm.h
@@ -275,6 +275,12 @@ get_page(struct page *page)
vm_page_wire(page);
}
+static inline void
+put_page(struct page *page)
+{
+ vm_page_unwire(page, PQ_ACTIVE);
+}
+
void linux_release_pages(struct page **pages, int nr);
#define release_pages(pages, nr) linux_release_pages((pages), (nr))
@@ -334,12 +340,6 @@ pin_user_pages_remote(struct task_struct *task, struct mm_struct *mm,
task, mm, start, nr_pages, gup_flags, pages, vmas);
}
-static inline void
-put_page(struct page *page)
-{
- vm_page_unwire(page, PQ_ACTIVE);
-}
-
#define unpin_user_page(page) put_page(page)
#define unpin_user_pages(pages, npages) release_pages(pages, npages)