Skip to content

Commit 849ad04

Browse files
author
Al Viro
committed
new helper: put_and_unmap_page()
kunmap_local() + put_page(), as done by e.g. ext2 directory handling. Signed-off-by: Al Viro <[email protected]>
1 parent fe15c26 commit 849ad04

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/linux/highmem.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,4 +481,10 @@ static inline void folio_zero_range(struct folio *folio,
481481
zero_user_segments(&folio->page, start, start + length, 0, 0);
482482
}
483483

484+
static inline void put_and_unmap_page(struct page *page, void *addr)
485+
{
486+
kunmap_local(addr);
487+
put_page(page);
488+
}
489+
484490
#endif /* _LINUX_HIGHMEM_H */

0 commit comments

Comments
 (0)