All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Christoph Hellwig <hch@lst.de>,
	Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: dhowells@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rxrpc: use kthread_ API
Date: Tue, 14 Feb 2006 18:20:12 +0000	[thread overview]
Message-ID: <6199.1139941212@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <20060214175240.GC19080@lst.de>

Christoph Hellwig <hch@lst.de> wrote:

> Use the kthread_ API instead of opencoding lots of hairy code for kernel
> thread creation and teardown.

I take it daemonize() does not now need to be called because the new process
derives from keventd.

You've also broken things... The waitqueue is there for a specific reason:
namely so that I can have multiple threads.

Actually, RxRPC and AFS should be made to use rpciod, except that Trond hasn't
got around to documenting it yet.

> +static struct task_struct *krxiod_thread;

That should be rxrpc_krxiod_thread.

> +	krxiod_thread = kthread_run(rxrpc_krxiod, NULL, "krxiod");
> +	if (IS_ERR(krxiod_thread))
> +		return PTR_ERR(krxiod_thread);
> +	return 0;

Don't assign an error to (rxrpc_)krxiod_thread.

> +static struct task_struct *krxsecd_thread;

Ditto on name.

> +	krxsecd_thread = kthread_run(rxrpc_krxsecd, NULL, "krxsecd");
> +	if (IS_ERR(krxsecd_thread))
> +		return PTR_ERR(krxsecd_thread);
> +	return 0;

Ditto on assignment of error.

> +static struct task_struct *krxtimod_thread;

Ditto on name (I'd got this one wrong too).

> +	krxtimod_thread = kthread_run(krxtimod, NULL, "krxtimod");
> +	if (IS_ERR(krxtimod_thread))
> +		return PTR_ERR(krxtimod_thread);
> +	return 0;

Ditto on assignment of error.

David

  reply	other threads:[~2006-02-14 18:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-14 17:52 [PATCH] rxrpc: use kthread_ API Christoph Hellwig
2006-02-14 18:20 ` David Howells [this message]
2006-02-14 19:51   ` Christoph Hellwig
2006-02-14 20:04     ` David Howells
2006-02-14 20:14       ` Christoph Hellwig

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=6199.1139941212@warthog.cambridge.redhat.com \
    --to=dhowells@redhat.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.