
From: Alexandr Zarochentzev <zam@namesys.com>

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: Alexandr Zarochentzev <zam@namesys.com>


 fs/reiser4/entd.c     |   10 +---------
 fs/reiser4/ktxnmgrd.c |   10 +---------
 2 files changed, 2 insertions(+), 18 deletions(-)

diff -puN fs/reiser4/entd.c~reiser4-use-try_to_freeze fs/reiser4/entd.c
--- linux-2.6.14-rc1-mm1/fs/reiser4/entd.c~reiser4-use-try_to_freeze	2005-09-16 18:19:10.703911653 +0400
+++ linux-2.6.14-rc1-mm1-vs/fs/reiser4/entd.c	2005-09-16 18:19:10.759926236 +0400
@@ -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
--- linux-2.6.14-rc1-mm1/fs/reiser4/ktxnmgrd.c~reiser4-use-try_to_freeze	2005-09-16 18:19:10.715914778 +0400
+++ linux-2.6.14-rc1-mm1-vs/fs/reiser4/ktxnmgrd.c	2005-09-16 18:19:10.759926236 +0400
@@ -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);

_
