]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: merge _xfs_buf_get_pages()
authorDave Chinner <dchinner@redhat.com>
Tue, 1 Jun 2021 03:40:36 +0000 (13:40 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 1 Jun 2021 03:40:36 +0000 (13:40 +1000)
commitf17d240062dfff9b63f3db0ab8aa49a2c14b6bef
treec03f3d5f2477d8f359a799b8001e2e8ee54bc0d7
parent47f8a2cd693ca515a87227356bbabd1c13cb7cfd
xfs: merge _xfs_buf_get_pages()

Only called from one place now, so merge it into
xfs_buf_alloc_pages(). Because page array allocation is dependent on
bp->b_pages being null, always ensure that when the pages array is
freed we always set bp->b_pages to null.

Also convert the page array to use kmalloc() rather than
kmem_alloc() so we can use the gfp flags we've already calculated
for the allocation context instead of hard coding KM_NOFS semantics.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_buf.c