Re: [PATCH] export [__]set_special_pids()

From: Andrew Morton
Date: Thu Oct 02 2003 - 00:08:47 EST


"Randy.Dunlap" <rddunlap@xxxxxxxx> wrote:
>
> EXPORT [__]set_special_pids(); Ingo added these
> in include/linux/sched.h but didn't export them;
> jffs uses set_special_pids();

jffs seems to be trying to do daemonize()-by-hand. It would be better for
it to get its act together and just call daemonize().

Is anyone actively testing and using jffs in 2.6? How does one get it
going with blkmtd??

diff -puN fs/jffs/intrep.c~jffs-use-daemonize fs/jffs/intrep.c
--- 25/fs/jffs/intrep.c~jffs-use-daemonize 2003-10-01 22:01:21.000000000 -0700
+++ 25-akpm/fs/jffs/intrep.c 2003-10-01 22:02:26.000000000 -0700
@@ -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"));


_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/