Commit d33d4c9e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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()
parents 4831f762 849ad04c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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 */