Commit ea8d7db9 authored by Herbert Xu's avatar Herbert Xu Committed by Linus Torvalds

[PATCH] Fix double module_put in lockd

kernel_thread() returns the pid if successful, so the test for
errors is to test for _negative_ values.
parent 0fca786c
......@@ -188,7 +188,7 @@ nlmclnt_recovery(struct nlm_host *host, u32 newstate)
nlmclnt_prepare_reclaim(host, newstate);
nlm_get_host(host);
__module_get(THIS_MODULE);
if (kernel_thread(reclaimer, host, CLONE_KERNEL))
if (kernel_thread(reclaimer, host, CLONE_KERNEL) < 0)
module_put(THIS_MODULE);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment