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

Commit d06df60b authored by Markus Pargmann's avatar Markus Pargmann Committed by Jens Axboe
Browse files

nbd: Replace kthread_create with kthread_run



kthread_run includes the wake_up_process() call, so instead of
kthread_create() followed by wake_up_process() we can use this macro.

Signed-off-by: default avatarMarkus Pargmann <mpa@pengutronix.de>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 13e71d69
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -728,13 +728,13 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
		else
			blk_queue_flush(nbd->disk->queue, 0);

		thread = kthread_create(nbd_thread, nbd, "%s",
		thread = kthread_run(nbd_thread, nbd, "%s",
				     nbd->disk->disk_name);
		if (IS_ERR(thread)) {
			mutex_lock(&nbd->tx_lock);
			return PTR_ERR(thread);
		}
		wake_up_process(thread);

		error = nbd_do_it(nbd);
		kthread_stop(thread);