[DRBD-cvs] drbd by lars; reverting last checkin wrt finish_wait.
drbd-user@lists.linbit.com
drbd-user@lists.linbit.com
Sat, 5 Jun 2004 11:06:55 +0200 (CEST)
DRBD CVS committal
Author : lars
Module : drbd
Dir : drbd/drbd
Modified Files:
Tag: rel-0_7-branch
drbd_receiver.c
Log Message:
reverting last checkin wrt finish_wait.
nonsense, and unrelated to strange RH NULL dereference
saturday morning, don't shoot to fast
===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_receiver.c,v
retrieving revision 1.97.2.166
retrieving revision 1.97.2.167
diff -u -3 -r1.97.2.166 -r1.97.2.167
--- drbd_receiver.c 5 Jun 2004 08:11:37 -0000 1.97.2.166
+++ drbd_receiver.c 5 Jun 2004 09:06:50 -0000 1.97.2.167
@@ -248,11 +248,11 @@
{
unsigned long flags;
- __set_current_state(state);
wait->flags &= ~WQ_FLAG_EXCLUSIVE;
spin_lock_irqsave(&q->lock, flags);
if (list_empty(&wait->task_list))
__add_wait_queue(q, wait);
+ set_current_state(state);
spin_unlock_irqrestore(&q->lock, flags);
}
@@ -261,11 +261,10 @@
unsigned long flags;
__set_current_state(TASK_RUNNING);
- if (!list_empty(&wait->task_list)) {
- spin_lock_irqsave(&q->lock, flags);
- list_del_init(&wait->task_list);
- spin_unlock_irqrestore(&q->lock, flags);
- }
+
+ spin_lock_irqsave(&q->lock, flags);
+ list_del_init(&wait->task_list);
+ spin_unlock_irqrestore(&q->lock, flags);
}
#define DEFINE_WAIT(name) DECLARE_WAITQUEUE(name,current)