]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs/ntfs3: return folios from ntfs_lock_new_page()
authorSun Jian <sun.jian.kdev@gmail.com>
Sat, 7 Feb 2026 14:45:52 +0000 (22:45 +0800)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 24 Feb 2026 19:03:35 +0000 (20:03 +0100)
commite8619bcb08b3012117cb2dbac8d02e78a39646cc
tree91552147125451247db4b58c497dc99fbc8809a3
parent3a2141b2f1c34fda9a4e5af6df519656b5c47013
fs/ntfs3: return folios from ntfs_lock_new_page()

ntfs_lock_new_page() currently returns a struct page * but it primarily
operates on folios via __filemap_get_folio(). Convert it to return a
struct folio * and use folio_alloc() + __folio_set_locked() for the
temporary page used to avoid data corruption during decompression.

When the cached folio is not uptodate, preserve the existing behavior by
using folio_file_page() and converting the returned page back to a
folio.

Update ni_readpage_cmpr() and ni_decompress_file() to handle the new
return type while keeping the existing struct page * array and the
unlock_page()/put_page() cleanup paths unchanged.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202602072013.jwrURE2e-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202602071921.nGIiI1J5-lkp@intel.com/
Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>
[almaz.alexandrovich@paragon-software.com: removed ni_fiemap function,
added reported-by and closes tags to commit]
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/frecord.c