diff options
author | Dave Chinner <dchinner@redhat.com> | 2024-01-15 23:59:40 +0100 |
---|---|---|
committer | Chandan Babu R <chandanbabu@kernel.org> | 2024-02-13 13:37:34 +0100 |
commit | f078d4ea827607867d42fb3b2ef907caf86ce49d (patch) | |
tree | ae780ad789ce6c7668a4c9c3d16add40881fffd4 /fs/xfs/xfs_log_recover.c | |
parent | xfs: convert kmem_zalloc() to kzalloc() (diff) | |
download | linux-f078d4ea827607867d42fb3b2ef907caf86ce49d.tar.xz linux-f078d4ea827607867d42fb3b2ef907caf86ce49d.zip |
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>
Diffstat (limited to 'fs/xfs/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 4a27ecdbb546..e3bd503edcab 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -2161,7 +2161,7 @@ xlog_recover_add_to_trans( return 0; } - ptr = kmem_alloc(len, 0); + ptr = xlog_kvmalloc(len); memcpy(ptr, dp, len); in_f = (struct xfs_inode_log_format *)ptr; |