diff mbox series

[08/61] xfs: use xfs_buf_alloc_pages for uncached buffers

Message ID 163174723845.350433.10227292919710229460.stgit@magnolia (mailing list archive)
State Accepted
Headers show
Series xfs: sync libxfs with 5.14 | expand

Commit Message

Darrick J. Wong Sept. 15, 2021, 11:07 p.m. UTC
From: Dave Chinner <dchinner@redhat.com>

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 <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 libxfs/xfs_ag.c |    1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/libxfs/xfs_ag.c b/libxfs/xfs_ag.c
index cf4d65a3..b94ad5c3 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;