From: Cedric Le Goater <clg@fr.ibm.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Neil Brown <neilb@suse.de>, nfs@lists.sourceforge.net
Subject: kthread: update lockd to use kthread
Date: Fri, 25 Aug 2006 09:25:25 +0200 [thread overview]
Message-ID: <44EEA5E5.6000509@fr.ibm.com> (raw)
Convert lockd to use kthread rather than kernel_thread, which is deprecated.
Not sure how to test it.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Neil Brown <neilb@suse.de>
Cc: nfs@lists.sourceforge.net
---
fs/lockd/clntlock.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Index: 2.6.18-rc4-mm2/fs/lockd/clntlock.c
===================================================================
--- 2.6.18-rc4-mm2.orig/fs/lockd/clntlock.c
+++ 2.6.18-rc4-mm2/fs/lockd/clntlock.c
@@ -14,6 +14,7 @@
#include <linux/sunrpc/svc.h>
#include <linux/lockd/lockd.h>
#include <linux/smp_lock.h>
+#include <linux/kthread.h>
#define NLMDBG_FACILITY NLMDBG_CLIENT
@@ -181,9 +182,12 @@ nlmclnt_recovery(struct nlm_host *host,
return;
host->h_nsmstate = newstate;
if (!host->h_reclaiming++) {
+ struct task_struct* task;
+
nlm_get_host(host);
__module_get(THIS_MODULE);
- if (kernel_thread(reclaimer, host, CLONE_KERNEL) < 0)
+ task = kthread_run(reclaimer, host, "%s-reclaim", host->h_name);
+ if (IS_ERR(task))
module_put(THIS_MODULE);
}
}
@@ -196,7 +200,6 @@ reclaimer(void *ptr)
struct file_lock *fl, *next;
u32 nsmstate;
- daemonize("%s-reclaim", host->h_name);
allow_signal(SIGKILL);
/* This one ensures that our parent doesn't terminate while the
next reply other threads:[~2006-08-25 7:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-25 7:25 Cedric Le Goater [this message]
2006-08-25 13:58 ` [NFS] kthread: update lockd to use kthread Christoph Hellwig
2006-08-25 17:07 ` Cedric Le Goater
2006-08-29 11:50 ` 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=44EEA5E5.6000509@fr.ibm.com \
--to=clg@fr.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=nfs@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