diff options
author | Dave Chinner <dchinner@redhat.com> | 2021-06-01 13:40:35 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2021-06-01 13:40:35 +1000 |
commit | 07b5c5add42a0afccf79401b12d78043ed6b8240 (patch) | |
tree | 64e299663c7aa996a84b8957bfdf84c42faf43de /fs/xfs/libxfs/xfs_ag.c | |
parent | 0a683794ace283984ae95ea6796f37b5f3afc446 (diff) | |
download | linux-stable-07b5c5add42a0afccf79401b12d78043ed6b8240.tar.gz linux-stable-07b5c5add42a0afccf79401b12d78043ed6b8240.tar.bz2 linux-stable-07b5c5add42a0afccf79401b12d78043ed6b8240.zip |
xfs: use xfs_buf_alloc_pages for uncached buffers
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>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ag.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_ag.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c index c68a36688474..be0087825ae0 100644 --- a/fs/xfs/libxfs/xfs_ag.c +++ b/fs/xfs/libxfs/xfs_ag.c @@ -43,7 +43,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; |