From: Leon Romanovsky <leonro@mellanox.com>
Date: Tue, 2 Oct 2018 11:48:01 +0300
Subject: RDMA/restrack: Un-inline set task implementation
Patch-mainline: v4.20-rc1
Git-commit: 363ad35577de3a73cf97006ec5f00fccaee73172
References: bsc#1103992 FATE#326009
Prepare rdma_restrack_set_task() call to accommodate more
code by moving its implementation from *.h to *.c.
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Reviewed-by: Yossi Itigin <yosefe@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
drivers/infiniband/core/restrack.c | 10 ++++++++++
include/rdma/restrack.h | 10 ++--------
2 files changed, 12 insertions(+), 8 deletions(-)
--- a/drivers/infiniband/core/restrack.c
+++ b/drivers/infiniband/core/restrack.c
@@ -155,6 +155,16 @@ static bool res_is_user(struct rdma_rest
}
}
+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);
--- a/include/rdma/restrack.h
+++ b/include/rdma/restrack.h
@@ -175,14 +175,8 @@ int rdma_restrack_put(struct rdma_restra
* @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