gfs2: Multi-block allocations in gfs2_page_mkwrite
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 7 Nov 2019 18:06:14 +0000 (18:06 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 10:04:33 +0000 (11:04 +0100)
commite697fd14dbaf4a862be481658bba173bfab32892
tree9ce487c1a5efd453cecf8e584610839c20a15c9e
parent1948e76afc1202558d05bea5e2278f42b81cee10
gfs2: Multi-block allocations in gfs2_page_mkwrite

commit f53056c43063257ae4159d83c425eaeb772bcd71 upstream.

In gfs2_page_mkwrite's gfs2_allocate_page_backing helper, try to
allocate as many blocks at once as we need.  Pass in the size of the
requested allocation.

Fixes: 35af80aef99b ("gfs2: don't use buffer_heads in gfs2_allocate_page_backing")
Cc: stable@vger.kernel.org # v5.3+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/gfs2/file.c