RE: [PATCH 2.5.52] Use __set_current_state() instead of current->

Perez-Gonzalez, Inaky (inaky.perez-gonzalez@intel.com)
Wed, 18 Dec 2002 16:46:00 -0800


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

Agreed; however, I also don't want to introduce unnecessary
bloat, so I need to understand first what cases need it - it
is kind of hard for me. Care to let me know some gotchas?

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

Is that because it is called lockless? ... grunt, in some areas
is kind of very obscure to guess if it is or not.

Inaky Perez-Gonzalez -- Not speaking for Intel - opinions are my own [or my
fault]

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