summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rdmavt/mr.c
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2016-05-26 12:50:05 -0400
committerDoug Ledford <dledford@redhat.com>2016-05-26 12:50:05 -0400
commit8779e7658df2496f27660586e3a20a86c75fb526 (patch)
tree831a1ebc8e399ee231fe23cf1eecc3fc4a70948a /drivers/infiniband/sw/rdmavt/mr.c
parente6f61130ed7a124138c4f7b1bd35e24e8113cb83 (diff)
parentf158486527ebfb4c1fe4dcb69b12479090d66b72 (diff)
downloadlinux-8779e7658df2496f27660586e3a20a86c75fb526.tar.bz2
Merge branch 'hfi1-2' into k.o/for-4.7
Diffstat (limited to 'drivers/infiniband/sw/rdmavt/mr.c')
-rw-r--r--drivers/infiniband/sw/rdmavt/mr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rdmavt/mr.c b/drivers/infiniband/sw/rdmavt/mr.c
index 0ff765bfd619..0f4d4500f45e 100644
--- a/drivers/infiniband/sw/rdmavt/mr.c
+++ b/drivers/infiniband/sw/rdmavt/mr.c
@@ -124,11 +124,13 @@ static int rvt_init_mregion(struct rvt_mregion *mr, struct ib_pd *pd,
int count)
{
int m, i = 0;
+ struct rvt_dev_info *dev = ib_to_rvt(pd->device);
mr->mapsz = 0;
m = (count + RVT_SEGSZ - 1) / RVT_SEGSZ;
for (; i < m; i++) {
- mr->map[i] = kzalloc(sizeof(*mr->map[0]), GFP_KERNEL);
+ mr->map[i] = kzalloc_node(sizeof(*mr->map[0]), GFP_KERNEL,
+ dev->dparms.node);
if (!mr->map[i]) {
rvt_deinit_mregion(mr);
return -ENOMEM;