From: Markus Pargmann <mpa@pengutronix.de>
To: Paul Clements <Paul.Clements@steeleye.com>
Cc: nbd-general@lists.sourceforge.net, linux-kernel@vger.kernel.org,
kernel@pengutronix.de, Markus Pargmann <mpa@pengutronix.de>
Subject: [RFC 1/4] nbd: Replace kthread_create with kthread_run
Date: Tue, 13 Jan 2015 14:44:22 +0100 [thread overview]
Message-ID: <1421156665-27318-2-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1421156665-27318-1-git-send-email-mpa@pengutronix.de>
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>
---
drivers/block/nbd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 4bc2a5cb9935..6bd7df2ff648 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -706,13 +706,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);
--
2.1.4
next prev parent reply other threads:[~2015-01-13 13:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 13:44 [RFC 0/4] nbd: root device support Markus Pargmann
2015-01-13 13:44 ` Markus Pargmann [this message]
2015-01-13 13:44 ` [RFC 2/4] nbd: Split 'DO_IT' into three functions Markus Pargmann
2015-01-26 16:16 ` Paul Clements
2015-01-26 16:23 ` Markus Pargmann
2015-01-13 13:44 ` [RFC 3/4] nbd: Create helper functions for ioctls Markus Pargmann
2015-01-28 21:04 ` Paul Clements
2015-01-30 7:54 ` Markus Pargmann
2015-01-13 13:44 ` [RFC 4/4] nbd: Add support for nbd as root device Markus Pargmann
2015-01-20 11:51 ` Markus Pargmann
2015-01-29 23:42 ` [Nbd] " Wouter Verhelst
2015-01-30 8:04 ` Markus Pargmann
2015-01-30 17:30 ` Wouter Verhelst
2015-01-31 12:38 ` Markus Pargmann
[not found] ` <CAECXXi5+VhBeZwZ5aosc+Oc+0bCZbJZTjzYA-QTRrJCjs2NFOw@mail.gmail.com>
2015-01-31 14:43 ` Andreas Klauer
2015-01-31 15:45 ` Markus Pargmann
2015-01-31 15:00 ` Markus Pargmann
2015-01-30 18:10 ` [Nbd] " H. Peter Anvin
2015-01-31 12:08 ` Markus Pargmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1421156665-27318-2-git-send-email-mpa@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=Paul.Clements@steeleye.com \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=nbd-general@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®