mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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 <mpa@pengutronix.de> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
13e71d69cc
commit
d06df60b94
@ -728,13 +728,13 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
|
|||||||
else
|
else
|
||||||
blk_queue_flush(nbd->disk->queue, 0);
|
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);
|
nbd->disk->disk_name);
|
||||||
if (IS_ERR(thread)) {
|
if (IS_ERR(thread)) {
|
||||||
mutex_lock(&nbd->tx_lock);
|
mutex_lock(&nbd->tx_lock);
|
||||||
return PTR_ERR(thread);
|
return PTR_ERR(thread);
|
||||||
}
|
}
|
||||||
wake_up_process(thread);
|
|
||||||
error = nbd_do_it(nbd);
|
error = nbd_do_it(nbd);
|
||||||
kthread_stop(thread);
|
kthread_stop(thread);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user