From: "Serge E. Hallyn" Update lockd/clntlock.c to use kthread instead of a deprecated kernel_thread. Signed-off-by: Serge E. Hallyn Cc: Trond Myklebust Cc: Neil Brown Signed-off-by: Andrew Morton --- fs/lockd/clntlock.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff -puN fs/lockd/clntlock.c~kthread-convert-lock-to-use-kthread fs/lockd/clntlock.c --- 25/fs/lockd/clntlock.c~kthread-convert-lock-to-use-kthread Mon Jun 19 14:50:59 2006 +++ 25-akpm/fs/lockd/clntlock.c Mon Jun 19 14:51:31 2006 @@ -14,6 +14,7 @@ #include #include #include +#include #define NLMDBG_FACILITY NLMDBG_CLIENT @@ -177,13 +178,17 @@ static void nlmclnt_finish_reclaim(struc void nlmclnt_recovery(struct nlm_host *host, u32 newstate) { + struct task_struct *tsk; + if (host->h_nsmstate == newstate) return; host->h_nsmstate = newstate; if (!host->h_reclaiming++) { nlm_get_host(host); __module_get(THIS_MODULE); - if (kernel_thread(reclaimer, host, CLONE_KERNEL) < 0) + tsk = kthread_run(reclaimer, host, + "%s-reclaim", host->h_name); + if (IS_ERR(tsk)) module_put(THIS_MODULE); } } @@ -196,7 +201,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 _