From: Vladimir Saveliev This patch cleanups reiser4 kernel threads: 1. uses try_to_freeze to freeze threads 2. removes code to block signals because it is not needed. Signed-off-by: Vladimir Saveliev Cc: Hans Reiser Signed-off-by: Andrew Morton --- fs/reiser4/entd.c | 10 +--------- fs/reiser4/ktxnmgrd.c | 10 +--------- reiser4/plugin/file/file.c | 0 3 files changed, 2 insertions(+), 18 deletions(-) diff -puN fs/reiser4/entd.c~reiser4-use-try_to_freeze fs/reiser4/entd.c --- devel/fs/reiser4/entd.c~reiser4-use-try_to_freeze 2005-09-16 15:58:42.000000000 -0700 +++ devel-akpm/fs/reiser4/entd.c 2005-09-16 15:58:42.000000000 -0700 @@ -144,12 +144,6 @@ static int entd(void *arg) /* reparent_to_init() is done by daemonize() */ daemonize("ent:%s", super->s_id); - /* block all signals */ - spin_lock_irq(&me->sighand->siglock); - siginitsetinv(&me->blocked, 0); - recalc_sigpending(); - spin_unlock_irq(&me->sighand->siglock); - /* do_fork() just copies task_struct into the new thread. ->fs_context shouldn't be copied of course. This shouldn't be a problem for the rest of the code though. @@ -166,11 +160,9 @@ static int entd(void *arg) complete(&ent->start_finish_completion); while (!ent->done) { - if (freezing(me)) - refrigerator(); + try_to_freeze(); spin_lock(&ent->guard); - while (ent->nr_all_requests != 0) { assert("zam-1043", ent->nr_all_requests >= diff -puN fs/reiser4/ktxnmgrd.c~reiser4-use-try_to_freeze fs/reiser4/ktxnmgrd.c --- devel/fs/reiser4/ktxnmgrd.c~reiser4-use-try_to_freeze 2005-09-16 15:58:42.000000000 -0700 +++ devel-akpm/fs/reiser4/ktxnmgrd.c 2005-09-16 15:58:42.000000000 -0700 @@ -68,12 +68,6 @@ static int ktxnmgrd(void *arg) /* reparent_to_init() is done by daemonize() */ daemonize(__FUNCTION__); - /* block all signals */ - spin_lock_irq(&me->sighand->siglock); - siginitsetinv(&me->blocked, 0); - recalc_sigpending(); - spin_unlock_irq(&me->sighand->siglock); - /* * do_fork() just copies task_struct into the new thread. ->fs_context * shouldn't be copied of course. This shouldn't be a problem for the @@ -88,9 +82,7 @@ static int ktxnmgrd(void *arg) complete(&ctx->start_finish_completion); while (1) { - /* software suspend support. */ - if (freezing(me)) - refrigerator(); + try_to_freeze(); set_comm("wait"); { DEFINE_WAIT(__wait); diff -puN fs/reiser4/plugin/file/file.c~reiser4-use-try_to_freeze fs/reiser4/plugin/file/file.c _