Commit 6fd390e2 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Andrew Morton
Browse files

RDMA/umem: don't abuse current->group_leader

Cleanup and preparation to simplify the next changes.

Use current->tgid instead of current->group_leader->pid.

Link: https://lkml.kernel.org/r/aXY_2JIhCeGAYC0r@redhat.com


Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Acked-by: default avatarLeon Romanovsky <leon@kernel.org>
Cc: Alice Ryhl <aliceryhl@google.com>
Cc: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Christan König <christian.koenig@amd.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Felix Kuehling <felix.kuehling@amd.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>
Cc: Steven Price <steven.price@arm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 05f8f36d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ struct ib_umem_odp *ib_umem_odp_alloc_implicit(struct ib_device *device,
	umem->owning_mm = current->mm;
	umem_odp->page_shift = PAGE_SHIFT;

	umem_odp->tgid = get_task_pid(current->group_leader, PIDTYPE_PID);
	umem_odp->tgid = get_task_pid(current, PIDTYPE_TGID);
	ib_init_umem_implicit_odp(umem_odp);
	return umem_odp;
}
@@ -258,7 +258,7 @@ struct ib_umem_odp *ib_umem_odp_get(struct ib_device *device,
		umem_odp->page_shift = HPAGE_SHIFT;
#endif

	umem_odp->tgid = get_task_pid(current->group_leader, PIDTYPE_PID);
	umem_odp->tgid = get_task_pid(current, PIDTYPE_TGID);
	ret = ib_init_umem_odp(umem_odp, ops);
	if (ret)
		goto err_put_pid;