|
@@ -72,12 +72,7 @@ prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state)
|
|
|
spin_lock_irqsave(&q->lock, flags);
|
|
|
if (list_empty(&wait->task_list))
|
|
|
__add_wait_queue(q, wait);
|
|
|
- /*
|
|
|
- * don't alter the task state if this is just going to
|
|
|
- * queue an async wait queue callback
|
|
|
- */
|
|
|
- if (is_sync_wait(wait))
|
|
|
- set_current_state(state);
|
|
|
+ set_current_state(state);
|
|
|
spin_unlock_irqrestore(&q->lock, flags);
|
|
|
}
|
|
|
EXPORT_SYMBOL(prepare_to_wait);
|
|
@@ -91,12 +86,7 @@ prepare_to_wait_exclusive(wait_queue_head_t *q, wait_queue_t *wait, int state)
|
|
|
spin_lock_irqsave(&q->lock, flags);
|
|
|
if (list_empty(&wait->task_list))
|
|
|
__add_wait_queue_tail(q, wait);
|
|
|
- /*
|
|
|
- * don't alter the task state if this is just going to
|
|
|
- * queue an async wait queue callback
|
|
|
- */
|
|
|
- if (is_sync_wait(wait))
|
|
|
- set_current_state(state);
|
|
|
+ set_current_state(state);
|
|
|
spin_unlock_irqrestore(&q->lock, flags);
|
|
|
}
|
|
|
EXPORT_SYMBOL(prepare_to_wait_exclusive);
|