[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <44EEA5E5.6000509@fr.ibm.com>
Date: Fri, 25 Aug 2006 09:25:25 +0200
From: Cedric Le Goater <clg@...ibm.com>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
CC: Neil Brown <neilb@...e.de>, nfs@...ts.sourceforge.net
Subject: kthread: update lockd to use kthread
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@...ibm.com>
Cc: Neil Brown <neilb@...e.de>
Cc: nfs@...ts.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists