]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: convert kmem_alloc() to kmalloc()
authorDave Chinner <dchinner@redhat.com>
Mon, 22 Apr 2024 17:00:50 +0000 (10:00 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 3 Jun 2024 18:37:35 +0000 (11:37 -0700)
commit522339840505765e1d04a7c79751e8f0170a8904
tree1e93e3dbf5ba2e3cdcc4286c5baf74a64f9d2ce6
parentcdc4e34ca04d9e21cf2f60c12aa1e8e8c8736199
xfs: convert kmem_alloc() to kmalloc()

Source kernel commit: f078d4ea827607867d42fb3b2ef907caf86ce49d

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>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
libxfs/xfs_attr_leaf.c
libxfs/xfs_btree_staging.c
libxfs/xfs_da_btree.c
libxfs/xfs_dir2.c
libxfs/xfs_dir2_block.c
libxfs/xfs_dir2_sf.c
libxfs/xfs_inode_fork.c