|
@@ -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);
|
|
|
|