]> git.proxmox.com Git - mirror_spl-debian.git/commit
Remove __GFP_NOFAIL in kmem and retry internally.
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 12 Nov 2009 23:11:24 +0000 (15:11 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 12 Nov 2009 23:11:24 +0000 (15:11 -0800)
commitc89fdee4d3530e22270ec2b700f697c5e0d46d71
treef0c9e48684f7374ca7f750f2c0176d8ed4f0edeb
parentbaf2979ed35c1a9c2e90e84416e220ab3d25140a
Remove __GFP_NOFAIL in kmem and retry internally.

As of 2.6.31 it's clear __GFP_NOFAIL should no longer be used and it
may disappear from the kernel at any time.  To handle this I have simply
added *_nofail wrappers in the kmem implementation which perform the
retry for non-atomic allocations.

From linux-2.6.31 mm/page_alloc.c:1166
/*
 * __GFP_NOFAIL is not to be used in new code.
 *
 * All __GFP_NOFAIL callers should be fixed so that they
 * properly detect and handle allocation failures.
 *
 * We most definitely don't want callers attempting to
 * allocate greater than order-1 page units with
 * __GFP_NOFAIL.
 */
WARN_ON_ONCE(order > 1);
include/sys/kmem.h
module/spl/spl-kmem.c