]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
jbd2: replace __get_free_pages() with kmalloc()
authorMike Rapoport (Microsoft) <rppt@kernel.org>
Sat, 23 May 2026 17:54:22 +0000 (20:54 +0300)
committerChristian Brauner <brauner@kernel.org>
Wed, 27 May 2026 13:12:24 +0000 (15:12 +0200)
commit2f6702dc6fdcf0ccc85417140e9ee1ce6a64863c
treeb84e59ed478baefe7b965cd1257979e0b1e6f66c
parentde9f4f0b2c0f31c3a9483dedd0e9bb7dcb409a13
jbd2: replace __get_free_pages() with kmalloc()

jbd2_alloc() falls back from kmem_cache_alloc() to __get_free_pages() for
allocations larger than PAGE_SIZE.
But kmalloc() can handle such cases with essentially the same fallback.

Replace use of __get_free_pages() with kmalloc() and simplify
jbd2_free() as both kmem_cache_alloc() and kmalloc() allocations can be
freed with kfree().

Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Link: https://patch.msgid.link/20260523-b4-fs-v1-10-275e36a83f0e@kernel.org
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/jbd2/journal.c