xfs: convert kmem_alloc() to kmalloc()
authorDave Chinner <dchinner@redhat.com>
Mon, 15 Jan 2024 22:59:40 +0000 (09:59 +1100)
committerChandan Babu R <chandanbabu@kernel.org>
Tue, 13 Feb 2024 12:37:34 +0000 (18:07 +0530)
commitf078d4ea827607867d42fb3b2ef907caf86ce49d
treeae780ad789ce6c7668a4c9c3d16add40881fffd4
parent10634530f7ba947d8eab52a580e0840778d4ef75
xfs: convert kmem_alloc() to kmalloc()

kmem_alloc() is just a thin wrapper around kmalloc() these days.
Convert everything to use kmalloc() so we can get rid of the
wrapper.

Note: the transaction region allocation in xlog_add_to_transaction()
can be a high order allocation. Converting it to use
kmalloc(__GFP_NOFAIL) results in warnings in the page allocation
code being triggered because the mm subsystem does not want us to
use __GFP_NOFAIL with high order allocations like we've been doing
with the kmem_alloc() wrapper for a couple of decades. Hence this
specific case gets converted to xlog_kvmalloc() rather than
kmalloc() to avoid this issue.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
21 files changed:
fs/xfs/Makefile
fs/xfs/kmem.c [deleted file]
fs/xfs/kmem.h
fs/xfs/libxfs/xfs_attr_leaf.c
fs/xfs/libxfs/xfs_btree_staging.c
fs/xfs/libxfs/xfs_da_btree.c
fs/xfs/libxfs/xfs_dir2.c
fs/xfs/libxfs/xfs_dir2_block.c
fs/xfs/libxfs/xfs_dir2_sf.c
fs/xfs/libxfs/xfs_inode_fork.c
fs/xfs/xfs_attr_list.c
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf_item_recover.c
fs/xfs/xfs_filestream.c
fs/xfs/xfs_inode_item_recover.c
fs/xfs/xfs_iwalk.c
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_qm.c
fs/xfs/xfs_rtalloc.c
fs/xfs/xfs_super.c
fs/xfs/xfs_trace.h