From eba507d3bd22970b5a92f9a366336d9a80aaa363 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 26 Jul 2006 16:02:53 +0300 Subject: [PATCH] --- yaml --- r: 33113 b: refs/heads/master c: bf74c7479ef47652005a2418eeb0d867451690da h: refs/heads/master i: 33111: ae3d0e5faba75cb6e8709eaa0bc7afe893009772 v: v3 --- [refs] | 2 +- trunk/drivers/infiniband/hw/mthca/mthca_allocator.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index e63ef2e3d15a..8560b9f40f68 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3f2792ffbd88dc1cd41d226674cc428914981e98 +refs/heads/master: bf74c7479ef47652005a2418eeb0d867451690da diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_allocator.c b/trunk/drivers/infiniband/hw/mthca/mthca_allocator.c index 9ba3211cef7c..848e583273d4 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_allocator.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_allocator.c @@ -144,7 +144,9 @@ void mthca_array_clear(struct mthca_array *array, int index) if (--array->page_list[p].used == 0) { free_page((unsigned long) array->page_list[p].page); array->page_list[p].page = NULL; - } + } else + array->page_list[p].page[index & (PAGE_SIZE / + sizeof (void *) - 1)] = NULL; if (array->page_list[p].used < 0) pr_debug("Array %p index %d page %d with ref count %d < 0\n",