Commit 895b494c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Nathan Scott

[XFS] No need to set task state back to TASK_RUNNING after returning from schedule()

SGI Modid: 2.5.x-xfs:slinx:134176a
parent f5e49239
......@@ -87,7 +87,7 @@ lock_wait(wait_queue_head_t *q, spinlock_t *lock, int rw)
{
DECLARE_WAITQUEUE( wait, current );
set_current_state(TASK_UNINTERRUPTIBLE);
__set_current_state(TASK_UNINTERRUPTIBLE);
spin_lock(&q->lock);
if (rw) {
......@@ -101,8 +101,6 @@ lock_wait(wait_queue_head_t *q, spinlock_t *lock, int rw)
schedule();
set_current_state(TASK_RUNNING);
spin_lock(&q->lock);
__remove_wait_queue(q, &wait);
spin_unlock(&q->lock);
......
......@@ -60,12 +60,11 @@ static inline void _sv_wait(sv_t *sv, spinlock_t *lock, int state,
DECLARE_WAITQUEUE(wait, current);
add_wait_queue_exclusive(&sv->waiters, &wait);
set_current_state(state);
__set_current_state(state);
spin_unlock(lock);
schedule_timeout(timeout);
set_current_state(TASK_RUNNING);
remove_wait_queue(&sv->waiters, &wait);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment