]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.fixes/nfs-slot-table-alloc
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / nfs-slot-table-alloc
1 From: Michal Hocko <mhocko@novell.com>
2 Subject: Don't fail allocations for the slot table when mounting an NFS filesystem
3 Patch-mainline: no
4 References: bnc#519820
5
6 When the *_slot_table_entries exceeds 111, the slot_table_size
7 exceeds 32K and an order-4 allocation is forced. This does not
8 retry nearly as much as order-3 so failure is more likely.
9 But mount and autofs in particular doesn't cope well with failure.
10 So force __GFP_REPEAT - the assumption is that people will only
11 set the slot_table_size sysctl large on a machine with plenty
12 of memory, so this should not block indefinitely.
13
14 Acked-by: Neil Brown <neilb@suse.de>
15 Signed-off-by: Neil Brown <neilb@suse.de>
16
17 ---
18 net/sunrpc/xprtsock.c | 4 ++--
19 1 file changed, 2 insertions(+), 2 deletions(-)
20
21 --- linux-2.6.27-SLE11_BRANCH.orig/net/sunrpc/xprtsock.c
22 +++ linux-2.6.27-SLE11_BRANCH/net/sunrpc/xprtsock.c
23 @@ -2011,7 +2011,7 @@ static struct rpc_xprt *xs_setup_xprt(st
24 xprt = &new->xprt;
25
26 xprt->max_reqs = slot_table_size;
27 - xprt->slot = kcalloc(xprt->max_reqs, sizeof(struct rpc_rqst), GFP_KERNEL);
28 + xprt->slot = kcalloc(xprt->max_reqs, sizeof(struct rpc_rqst), GFP_KERNEL | __GFP_REPEAT);
29 if (xprt->slot == NULL) {
30 kfree(xprt);
31 dprintk("RPC: xs_setup_xprt: couldn't allocate slot "