From: Yishai Hadas <yish...@mellanox.com>

Commit bc3e53f68 "mm: distinguish between mlocked and pinned pages"
introduced a separate counter for pinned pages and used it over
the IB stack. Specifically, in ib_umem_get the pinned counter
is incremented, but ib_umem_release wrongly decrements the
locked counter, fix that.

Cc: Christoph Lameter <c...@linux.com>
Signed-off-by: Yishai Hadas <yish...@mellanox.com>
---
 drivers/infiniband/core/umem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index 71f0c0f..a841123 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -269,7 +269,7 @@ void ib_umem_release(struct ib_umem *umem)
        } else
                down_write(&mm->mmap_sem);
 
-       current->mm->locked_vm -= diff;
+       current->mm->pinned_vm -= diff;
        up_write(&mm->mmap_sem);
        mmput(mm);
        kfree(umem);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to