Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 363ad355 authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Jason Gunthorpe
Browse files

RDMA/restrack: Un-inline set task implementation



Prepare rdma_restrack_set_task() call to accommodate more
code by moving its implementation from *.h to *.c.

Reviewed-by: default avatarArtemy Kovalyov <artemyko@mellanox.com>
Reviewed-by: default avatarYossi Itigin <yosefe@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Reviewed-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent fe33507e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -155,6 +155,16 @@ static bool res_is_user(struct rdma_restrack_entry *res)
	}
}

void rdma_restrack_set_task(struct rdma_restrack_entry *res,
			    struct task_struct *task)
{
	if (res->task)
		put_task_struct(res->task);
	get_task_struct(task);
	res->task = task;
}
EXPORT_SYMBOL(rdma_restrack_set_task);

void rdma_restrack_add(struct rdma_restrack_entry *res)
{
	struct ib_device *dev = res_to_dev(res);
+2 −8
Original line number Diff line number Diff line
@@ -175,14 +175,8 @@ int rdma_restrack_put(struct rdma_restrack_entry *res);
 * @res:  resource entry
 * @task: task struct
 */
static inline void rdma_restrack_set_task(struct rdma_restrack_entry *res,
					  struct task_struct *task)
{
	if (res->task)
		put_task_struct(res->task);
	get_task_struct(task);
	res->task = task;
}
void rdma_restrack_set_task(struct rdma_restrack_entry *res,
			    struct task_struct *task);

/*
 * Helper functions for rdma drivers when filling out