summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-08-10 15:05:02 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2014-02-17 16:50:35 +0100
commitc60b0251d9d350194c7ae8b1d41885a14e858e65 (patch)
treea6fa0b53b054d345fce7537d52942cebd264411c /drivers/block/drbd/drbd_main.c
parentdrbd: Pass a peer device to a number of fuctions (diff)
downloadlinux-c60b0251d9d350194c7ae8b1d41885a14e858e65.tar.xz
linux-c60b0251d9d350194c7ae8b1d41885a14e858e65.zip
drbd: Kill drbd_task_to_thread_name()
Signed-off-by: Andreas Gruenbacher <agruen@linbit.com> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r--drivers/block/drbd/drbd_main.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 64a084c159ee..6c86807f22ec 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -368,14 +368,14 @@ restart:
}
static void drbd_thread_init(struct drbd_connection *connection, struct drbd_thread *thi,
- int (*func) (struct drbd_thread *), char *name)
+ int (*func) (struct drbd_thread *), const char *name)
{
spin_lock_init(&thi->t_lock);
thi->task = NULL;
thi->t_state = NONE;
thi->function = func;
thi->connection = connection;
- strncpy(thi->name, name, ARRAY_SIZE(thi->name));
+ thi->name = name;
}
int drbd_thread_start(struct drbd_thread *thi)
@@ -475,22 +475,6 @@ void _drbd_thread_stop(struct drbd_thread *thi, int restart, int wait)
wait_for_completion(&thi->stop);
}
-static struct drbd_thread *drbd_task_to_thread(struct drbd_connection *connection, struct task_struct *task)
-{
- struct drbd_thread *thi =
- task == connection->receiver.task ? &connection->receiver :
- task == connection->asender.task ? &connection->asender :
- task == connection->worker.task ? &connection->worker : NULL;
-
- return thi;
-}
-
-char *drbd_task_to_thread_name(struct drbd_connection *connection, struct task_struct *task)
-{
- struct drbd_thread *thi = drbd_task_to_thread(connection, task);
- return thi ? thi->name : task->comm;
-}
-
int conn_lowest_minor(struct drbd_connection *connection)
{
struct drbd_peer_device *peer_device;