qubes-linux-kernel/patches.fixes/nfs-slot-table-alloc

32 lines
1.1 KiB
Plaintext
Raw Normal View History

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(-)
2011-04-19 20:09:59 +00:00
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -2266,7 +2266,7 @@ static struct rpc_xprt *xs_setup_xprt(st
kref_init(&xprt->kref);
xprt->max_reqs = max_req;
- xprt->slot = kcalloc(max_req, sizeof(struct rpc_rqst), GFP_KERNEL);
+ xprt->slot = kcalloc(max_req, sizeof(struct rpc_rqst), GFP_KERNEL | __GFP_REPEAT);
if (xprt->slot == NULL)
goto out_free;