]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: convert buf_cancel_table allocation to kmalloc_array
authorDarrick J. Wong <djwong@kernel.org>
Fri, 27 May 2022 00:27:19 +0000 (10:27 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 27 May 2022 00:27:19 +0000 (10:27 +1000)
commita3339b6dc4bc489fbb8f2b91fa1381a9b94e9e75
tree8a79c9bf094fc6d446e310df1d2e2f3159074ab6
parent094dc0e46ecd592954b9f64eba688799dd8c8c0f
xfs: convert buf_cancel_table allocation to kmalloc_array

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>
fs/xfs/libxfs/xfs_log_recover.h
fs/xfs/xfs_buf_item_recover.c
fs/xfs/xfs_log_recover.c