diff options
| author | Kundan Kumar <kundan.kumar@samsung.com> | 2024-09-11 09:49:34 +0300 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2024-09-11 16:24:01 +0300 |
| commit | d3bfbfb1248498656cd25c51e41c1e31219bd0dd (patch) | |
| tree | 77b5c25b9a8f912a652b81863e5bfa359823da07 /include | |
| parent | ed9832bc08db29874600eb066b74918fe6fc2060 (diff) | |
| download | linux-d3bfbfb1248498656cd25c51e41c1e31219bd0dd.tar.xz | |
mm: release number of pages of a folio
Add a new function unpin_user_folio() to put the refs of a folio by
npages count.
The check for BIO_PAGE_PINNED flag is removed as it is already checked
in bio_release_pages().
Signed-off-by: Kundan Kumar <kundan.kumar@samsung.com>
Tested-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lore.kernel.org/r/20240911064935.5630-4-kundan.kumar@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/mm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index c4b238a20b76..2fd88cd5997d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1597,6 +1597,7 @@ void unpin_user_pages_dirty_lock(struct page **pages, unsigned long npages, void unpin_user_page_range_dirty_lock(struct page *page, unsigned long npages, bool make_dirty); void unpin_user_pages(struct page **pages, unsigned long npages); +void unpin_user_folio(struct folio *folio, unsigned long npages); void unpin_folios(struct folio **folios, unsigned long nfolios); static inline bool is_cow_mapping(vm_flags_t flags) |
