Commit 91d61a0f authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] jffs: use daemonize()

Use daemonize() rather than open-coding half of it.

(I don't know if this has been tested - it has been in -mm for three months).
parent e8be17fa
......@@ -3337,18 +3337,16 @@ jffs_garbage_collect_thread(void *ptr)
int result = 0;
D1(int i = 1);
daemonize("jffs_gcd");
c->gc_task = current;
lock_kernel();
exit_mm(c->gc_task);
set_special_pids(1, 1);
init_completion(&c->gc_thread_comp); /* barrier */
spin_lock_irq(&current->sighand->siglock);
siginitsetinv (&current->blocked, sigmask(SIGHUP) | sigmask(SIGKILL) | sigmask(SIGSTOP) | sigmask(SIGCONT));
recalc_sigpending();
spin_unlock_irq(&current->sighand->siglock);
strcpy(current->comm, "jffs_gcd");
D1(printk (KERN_NOTICE "jffs_garbage_collect_thread(): Starting infinite loop.\n"));
......
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