From: Markus Pargmann Date: Thu, 2 Apr 2015 08:11:36 +0000 (+0200) Subject: nbd: Replace kthread_create with kthread_run X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d06df60b9460838553d37d01049d04c43a36f396;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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: Markus Pargmann Acked-by: Pavel Machek Signed-off-by: Jens Axboe --- diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 1aaabcc2af92..5bc221693304 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -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", - nbd->disk->disk_name); + 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);