]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: convert buf_cancel_table allocation to kmalloc_array
authorDarrick J. Wong <djwong@kernel.org>
Thu, 16 Nov 2023 02:28:19 +0000 (18:28 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 16:56:25 +0000 (16:56 +0000)
commitefd194800b69c13adb5edaa9927362aaca78bc9a
treecb97b035949c243aa2b3f655b21c5a9f9a640255
parent074fee18693144e26d2ca41defa7425258ebad5a
xfs: convert buf_cancel_table allocation to kmalloc_array

[ Upstream commit 910bbdf2f4d7df46781bc9b723048f5ebed3d0d7 ]

While we're messing around with how recovery allocates and frees the
buffer cancellation table, convert the allocation to use kmalloc_array
instead of the old kmem_alloc APIs, and make it handle a null return,
even though that's not likely.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Leah Rumancik <leah.rumancik@gmail.com>
Acked-by: Chandan Babu R <chandanbabu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/libxfs/xfs_log_recover.h
fs/xfs/xfs_buf_item_recover.c
fs/xfs/xfs_log_recover.c