> 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/