Re: [PATCH 2.5.52] Use __set_current_state() instead of current->state = (take 1)

From: Robert Love (rml@tech9.net)
Date: Wed Dec 18 2002 - 19:11:38 EST


On Wed, 2002-12-18 at 18:56, Inaky Perez-Gonzalez wrote:

> In fs/*.c, many functions manually set the task state directly
> accessing current->state, or with a macro, kind of
> inconsistently. This patch changes all of them to use
> [__]set_current_state().

Some of these should probably be set_current_state(). I realize the
current code is equivalent to __set_current_state() but it might as well
be done right.

> diff -u fs/locks.c:1.1.1.6 fs/locks.c:1.1.1.1.6.2
> --- fs/locks.c:1.1.1.6 Wed Dec 11 11:13:35 2002
> +++ fs/locks.c Wed Dec 18 13:20:24 2002
> @@ -571,7 +571,7 @@
> int result = 0;
> DECLARE_WAITQUEUE(wait, current);
>
> - current->state = TASK_INTERRUPTIBLE;
> + __set_current_state (TASK_INTERRUPTIBLE);
> add_wait_queue(fl_wait, &wait);
> if (timeout == 0)

At least this guy should be set_current_state(), on quick glance.

When in doubt just use set_current_state()..

        Robert Love

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



This archive was generated by hypermail 2b29 : Mon Dec 23 2002 - 22:00:21 EST