Quoting r. Roland Dreier <[EMAIL PROTECTED]>:
> OK, this looks fine.  Applied (with slight renames of function names).
> 
> Thanks,
>   Roland
> 

Now that ib_umem_release is always called in the context of a system
call, we dont have to get_task_mm, since current->mm is not going anywere.

Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>

Index: infiniband/core/uverbs_mem.c
===================================================================
--- infiniband/core/uverbs_mem.c        (revision 2740)
+++ infiniband/core/uverbs_mem.c        (working copy)
@@ -174,14 +174,10 @@ void ib_umem_release(struct ib_device *d
 
        __ib_umem_release(dev, umem, 1);
 
-       mm = get_task_mm(current);
-       if (!mm)
-               return;
-
+       mm = current->mm;
        down_write(&mm->mmap_sem);
        mm->locked_vm -= PAGE_ALIGN(umem->length + umem->offset) >> PAGE_SHIFT;
        up_write(&mm->mmap_sem);
-       mmput(mm);
 }
 
 static void ib_umem_account(void *work_ptr)
-- 
MST
_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to