mirror of
https://github.com/opnsense/src.git
synced 2026-07-15 20:13:02 -04:00
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
This commit is contained in:
parent
e51729f608
commit
fe5ce9eb02
1 changed files with 6 additions and 6 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue