]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: use xfs_buf_alloc_pages for uncached buffers
authorDave Chinner <dchinner@redhat.com>
Tue, 1 Jun 2021 03:40:35 +0000 (13:40 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 1 Jun 2021 03:40:35 +0000 (13:40 +1000)
commitbe5d21c6683dda4e355e461898d68a3b4b880ffc
tree64e299663c7aa996a84b8957bfdf84c42faf43de
parentba3b414ee42f49ac7be6b5ea7289aeabaedd97d5
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>
fs/xfs/libxfs/xfs_ag.c
fs/xfs/xfs_buf.c