mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-29 18:16:36 -04:00
Merge tag 'fs_for_v6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull ext2, udf, and quota updates from Jan Kara: - conversion of ext2 directory code to use folios - cleanups in UDF declarations - bugfix for quota interaction with file encryption * tag 'fs_for_v6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: Convert ext2_prepare_chunk and ext2_commit_chunk to folios ext2: Convert ext2_make_empty() to use a folio ext2: Convert ext2_unlink() and ext2_rename() to use folios ext2: Convert ext2_delete_entry() to use folios ext2: Convert ext2_empty_dir() to use a folio ext2: Convert ext2_add_link() to use a folio ext2: Convert ext2_readdir to use a folio ext2: Add ext2_get_folio() ext2: Convert ext2_check_page to ext2_check_folio highmem: Add folio_release_kmap() udf: Avoid unneeded variable length array in struct fileIdentDesc udf: Annotate struct udf_bitmap with __counted_by quota: explicitly forbid quota files from being encrypted
This commit is contained in:
@@ -551,10 +551,24 @@ static inline void folio_zero_range(struct folio *folio,
|
||||
zero_user_segments(&folio->page, start, start + length, 0, 0);
|
||||
}
|
||||
|
||||
static inline void unmap_and_put_page(struct page *page, void *addr)
|
||||
/**
|
||||
* folio_release_kmap - Unmap a folio and drop a refcount.
|
||||
* @folio: The folio to release.
|
||||
* @addr: The address previously returned by a call to kmap_local_folio().
|
||||
*
|
||||
* It is common, eg in directory handling to kmap a folio. This function
|
||||
* unmaps the folio and drops the refcount that was being held to keep the
|
||||
* folio alive while we accessed it.
|
||||
*/
|
||||
static inline void folio_release_kmap(struct folio *folio, void *addr)
|
||||
{
|
||||
kunmap_local(addr);
|
||||
put_page(page);
|
||||
folio_put(folio);
|
||||
}
|
||||
|
||||
static inline void unmap_and_put_page(struct page *page, void *addr)
|
||||
{
|
||||
folio_release_kmap(page_folio(page), addr);
|
||||
}
|
||||
|
||||
#endif /* _LINUX_HIGHMEM_H */
|
||||
|
||||
Reference in New Issue
Block a user