rds: rds_ib_recv_alloc_cache() should call alloc_percpu_gfp() instead
[linux-2.6-microblaze.git] / net / rds / ib_recv.c
index 557ccbb..d300186 100644 (file)
@@ -98,12 +98,12 @@ static void rds_ib_cache_xfer_to_ready(struct rds_ib_refill_cache *cache)
        }
 }
 
-static int rds_ib_recv_alloc_cache(struct rds_ib_refill_cache *cache)
+static int rds_ib_recv_alloc_cache(struct rds_ib_refill_cache *cache, gfp_t gfp)
 {
        struct rds_ib_cache_head *head;
        int cpu;
 
-       cache->percpu = alloc_percpu(struct rds_ib_cache_head);
+       cache->percpu = alloc_percpu_gfp(struct rds_ib_cache_head, gfp);
        if (!cache->percpu)
               return -ENOMEM;
 
@@ -118,13 +118,13 @@ static int rds_ib_recv_alloc_cache(struct rds_ib_refill_cache *cache)
        return 0;
 }
 
-int rds_ib_recv_alloc_caches(struct rds_ib_connection *ic)
+int rds_ib_recv_alloc_caches(struct rds_ib_connection *ic, gfp_t gfp)
 {
        int ret;
 
-       ret = rds_ib_recv_alloc_cache(&ic->i_cache_incs);
+       ret = rds_ib_recv_alloc_cache(&ic->i_cache_incs, gfp);
        if (!ret) {
-               ret = rds_ib_recv_alloc_cache(&ic->i_cache_frags);
+               ret = rds_ib_recv_alloc_cache(&ic->i_cache_frags, gfp);
                if (ret)
                        free_percpu(ic->i_cache_incs.percpu);
        }