diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2023-03-07 01:50:53 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2023-03-07 01:50:53 -0500 |
commit | 849ad04cf562ac63b0371a825eed473d84de9c6d (patch) | |
tree | c23ae421694f5d2645fb0af61045c41f0a01793e /include/linux/highmem.h | |
parent | fe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff) | |
download | linux-849ad04cf562ac63b0371a825eed473d84de9c6d.tar.gz linux-849ad04cf562ac63b0371a825eed473d84de9c6d.tar.bz2 linux-849ad04cf562ac63b0371a825eed473d84de9c6d.zip |
new helper: put_and_unmap_page()
kunmap_local() + put_page(), as done by e.g. ext2 directory handling.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/highmem.h')
-rw-r--r-- | include/linux/highmem.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/highmem.h b/include/linux/highmem.h index b06254e76d99..8fc10089e19e 100644 --- a/include/linux/highmem.h +++ b/include/linux/highmem.h @@ -481,4 +481,10 @@ static inline void folio_zero_range(struct folio *folio, zero_user_segments(&folio->page, start, start + length, 0, 0); } +static inline void put_and_unmap_page(struct page *page, void *addr) +{ + kunmap_local(addr); + put_page(page); +} + #endif /* _LINUX_HIGHMEM_H */ |