qubes-linux-kernel/patches.fixes/nfs-slot-table-alloc
2010-07-07 13:12:45 +02:00

32 lines
1.2 KiB
Plaintext

From: Michal Hocko <mhocko@novell.com>
Subject: Don't fail allocations for the slot table when mounting an NFS filesystem
Patch-mainline: no
References: bnc#519820
When the *_slot_table_entries exceeds 111, the slot_table_size
exceeds 32K and an order-4 allocation is forced. This does not
retry nearly as much as order-3 so failure is more likely.
But mount and autofs in particular doesn't cope well with failure.
So force __GFP_REPEAT - the assumption is that people will only
set the slot_table_size sysctl large on a machine with plenty
of memory, so this should not block indefinitely.
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: Neil Brown <neilb@suse.de>
---
net/sunrpc/xprtsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2295,7 +2295,7 @@ static struct rpc_xprt *xs_setup_xprt(st
xprt = &new->xprt;
xprt->max_reqs = slot_table_size;
- xprt->slot = kcalloc(xprt->max_reqs, sizeof(struct rpc_rqst), GFP_KERNEL);
+ xprt->slot = kcalloc(xprt->max_reqs, sizeof(struct rpc_rqst), GFP_KERNEL | __GFP_REPEAT);
if (xprt->slot == NULL) {
kfree(xprt);
dprintk("RPC: xs_setup_xprt: couldn't allocate slot "