]> git.hungrycats.org Git - linux/commit
ntfs: use page allocation for resident attribute inline data
authorNamjae Jeon <linkinjeon@kernel.org>
Wed, 22 Apr 2026 02:56:12 +0000 (11:56 +0900)
committerNamjae Jeon <linkinjeon@kernel.org>
Wed, 22 Apr 2026 10:05:07 +0000 (19:05 +0900)
commit36ee1313199b7f16bf963c6ac0241861585125d9
tree1b22487eaf912311bf05c220d355264a72c82010
parent6e0152c75d70725add4cef3b1cb10abc6efa6ad9
ntfs: use page allocation for resident attribute inline data

The current kmemdup() based allocation for IOMAP_INLINE can result in
inline_data pointer having a non-zero page offset. This causes
iomap_inline_data_valid() to fail the check:

    iomap->length <= PAGE_SIZE - offset_in_page(iomap->inline_data)

and triggers the kernel BUG at fs/iomap/buffered-io.c:1061.

This particularly affects workloads with frequent small file access
(e.g. Firefox Nightly profile on NTFS with bind mount) when using the
new ntfs. This fix this by allocating a full page with alloc_page() so that
page_address() always returns a page-aligned address.

Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/ntfs/iomap.c