summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/rds/ib.h2
-rw-r--r--net/rds/ib_cm.c2
-rw-r--r--net/rds/ib_recv.c10
3 files changed, 7 insertions, 7 deletions
diff --git a/net/rds/ib.h b/net/rds/ib.h
index beb95b893f78..73427ff439f9 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -400,7 +400,7 @@ void rds_ib_mr_cqe_handler(struct rds_ib_connection *ic, struct ib_wc *wc);
400int rds_ib_recv_init(void); 400int rds_ib_recv_init(void);
401void rds_ib_recv_exit(void); 401void rds_ib_recv_exit(void);
402int rds_ib_recv_path(struct rds_conn_path *conn); 402int rds_ib_recv_path(struct rds_conn_path *conn);
403int rds_ib_recv_alloc_caches(struct rds_ib_connection *ic); 403int rds_ib_recv_alloc_caches(struct rds_ib_connection *ic, gfp_t gfp);
404void rds_ib_recv_free_caches(struct rds_ib_connection *ic); 404void rds_ib_recv_free_caches(struct rds_ib_connection *ic);
405void rds_ib_recv_refill(struct rds_connection *conn, int prefill, gfp_t gfp); 405void rds_ib_recv_refill(struct rds_connection *conn, int prefill, gfp_t gfp);
406void rds_ib_inc_free(struct rds_incoming *inc); 406void rds_ib_inc_free(struct rds_incoming *inc);
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index a33b82dc0804..0d654d99fe41 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -1102,7 +1102,7 @@ int rds_ib_conn_alloc(struct rds_connection *conn, gfp_t gfp)
1102 if (!ic) 1102 if (!ic)
1103 return -ENOMEM; 1103 return -ENOMEM;
1104 1104
1105 ret = rds_ib_recv_alloc_caches(ic); 1105 ret = rds_ib_recv_alloc_caches(ic, gfp);
1106 if (ret) { 1106 if (ret) {
1107 kfree(ic); 1107 kfree(ic);
1108 return ret; 1108 return ret;
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index 557ccbb1ce00..d300186b8dc0 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -98,12 +98,12 @@ static void rds_ib_cache_xfer_to_ready(struct rds_ib_refill_cache *cache)
98 } 98 }
99} 99}
100 100
101static int rds_ib_recv_alloc_cache(struct rds_ib_refill_cache *cache) 101static int rds_ib_recv_alloc_cache(struct rds_ib_refill_cache *cache, gfp_t gfp)
102{ 102{
103 struct rds_ib_cache_head *head; 103 struct rds_ib_cache_head *head;
104 int cpu; 104 int cpu;
105 105
106 cache->percpu = alloc_percpu(struct rds_ib_cache_head); 106 cache->percpu = alloc_percpu_gfp(struct rds_ib_cache_head, gfp);
107 if (!cache->percpu) 107 if (!cache->percpu)
108 return -ENOMEM; 108 return -ENOMEM;
109 109
@@ -118,13 +118,13 @@ static int rds_ib_recv_alloc_cache(struct rds_ib_refill_cache *cache)
118 return 0; 118 return 0;
119} 119}
120 120
121int rds_ib_recv_alloc_caches(struct rds_ib_connection *ic) 121int rds_ib_recv_alloc_caches(struct rds_ib_connection *ic, gfp_t gfp)
122{ 122{
123 int ret; 123 int ret;
124 124
125 ret = rds_ib_recv_alloc_cache(&ic->i_cache_incs); 125 ret = rds_ib_recv_alloc_cache(&ic->i_cache_incs, gfp);
126 if (!ret) { 126 if (!ret) {
127 ret = rds_ib_recv_alloc_cache(&ic->i_cache_frags); 127 ret = rds_ib_recv_alloc_cache(&ic->i_cache_frags, gfp);
128 if (ret) 128 if (ret)
129 free_percpu(ic->i_cache_incs.percpu); 129 free_percpu(ic->i_cache_incs.percpu);
130 } 130 }