]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: use xfs_buf_alloc_pages for uncached buffers
authorDave Chinner <dchinner@redhat.com>
Thu, 14 Oct 2021 16:35:45 +0000 (12:35 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 14 Oct 2021 16:35:45 +0000 (12:35 -0400)
commit0bba7995ac33779730eae2c8787ec4f7f2e1432f
treea4115378df73878eec2dcfb0d8ee9ad0945aad37
parent7bf9cd9d3689a5a7f09d6b59ff1d05de4e22c1cf
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 <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_ag.c