put_and_unmap_page() helper
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQqUNBr3gm4hGXdBJlZ7Krx/gZQ6wUCZAuS9AAKCRBZ7Krx/gZQ 6/HUAQCkaWkt0zi9dh+T5gKD9U9/R3DBLHm2W7o414ewFhEcaAEAjCrwc3c+RIf2 AEr8tsYNXI7Lqvh1q0QLugezChYyVgk= =3K38 -----END PGP SIGNATURE----- Merge tag 'pull-highmem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull put_and_unmap_page() helper from Al Viro: "kmap_local_page() conversions in local filesystems keep running into kunmap_local_page()+put_page() combinations. We can keep inventing names for identical inline helpers, but it's getting rather inconvenient. I've added a trivial helper to linux/highmem.h instead. I would've held that back until the merge window, if not for the mess it causes in tree topology - I've several branches merging from that one, and it's only going to get worse if e.g. ext2 stuff gets picked by Jan" * tag 'pull-highmem' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: new helper: put_and_unmap_page()
This commit is contained in:
commit
d33d4c9e08
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue