From dea3539e591cbf78c8750b6b1bddfd98b0aa131a Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Mon, 12 Jul 2021 14:57:20 -0700 Subject: [PATCH] xfs: use xfs_buf_alloc_pages for uncached buffers Source kernel commit: 07b5c5add42a0afccf79401b12d78043ed6b8240 Use the newly factored out page allocation code. This adds automatic buffer zeroing for non-read uncached buffers. This also allows us to greatly simply the error handling in xfs_buf_get_uncached(). Because xfs_buf_alloc_pages() cleans up partial allocation failure, we can just call xfs_buf_free() in all error cases now to clean up after failures. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- libxfs/xfs_ag.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libxfs/xfs_ag.c b/libxfs/xfs_ag.c index cf4d65a38..b94ad5c3c 100644 --- a/libxfs/xfs_ag.c +++ b/libxfs/xfs_ag.c @@ -42,7 +42,6 @@ xfs_get_aghdr_buf( if (error) return error; - xfs_buf_zero(bp, 0, BBTOB(bp->b_length)); bp->b_bn = blkno; bp->b_maps[0].bm_bn = blkno; bp->b_ops = ops; -- 2.47.3