xfs: remove kmem_zalloc_greedy
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 6 Mar 2017 19:58:20 +0000 (11:58 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Oct 2017 08:14:20 +0000 (10:14 +0200)
commit0185496a115dbdee8b2428541949217039222d84
treee690e942be8478f41cd7c32a21e061005b7b2143
parent088b9a41b605079f253b99f4bba868eda89bc9fa
xfs: remove kmem_zalloc_greedy

[ Upstream commit 08b005f1333154ae5b404ca28766e0ffb9f1c150 ]

The sole remaining caller of kmem_zalloc_greedy is bulkstat, which uses
it to grab 1-4 pages for staging of inobt records.  The infinite loop in
the greedy allocation function is causing hangs[1] in generic/269, so
just get rid of the greedy allocator in favor of kmem_zalloc_large.
This makes bulkstat somewhat more likely to ENOMEM if there's really no
pages to spare, but eliminates a source of hangs.

[1] http://lkml.kernel.org/r/20170301044634.rgidgdqqiiwsmfpj%40XZHOUW.usersys.redhat.com

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/kmem.c
fs/xfs/kmem.h
fs/xfs/xfs_itable.c