IB/umem: Release pid in error and ODP flow
authorKenneth Lee <liguozhu@hisilicon.com>
Thu, 5 Jan 2017 07:00:05 +0000 (15:00 +0800)
committerDoug Ledford <dledford@redhat.com>
Tue, 24 Jan 2017 20:44:31 +0000 (15:44 -0500)
commit828f6fa65ce7e80f77f5ab12942e44eb3d9d174e
tree09256b2ef0bbc46a1fbe79c5e0eaef8cd874dac9
parentf449c7a2d822c2d81b5bcb2c50eec80796766726
IB/umem: Release pid in error and ODP flow

1. Release pid before enter odp flow
2. Release pid when fail to allocate memory

Fixes: 87773dd56d54 ("IB: ib_umem_release() should decrement mm->pinned_vm from ib_umem_get")
Fixes: 8ada2c1c0c1d ("IB/core: Add support for on demand paging regions")
Signed-off-by: Kenneth Lee <liguozhu@hisilicon.com>
Reviewed-by: Haggai Eran <haggaie@mellanox.com>
Reviewed-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/umem.c