[DRBD-cvs] drbd by phil; * Removed an outdated comment from the L...

drbd-user@lists.linbit.com drbd-user@lists.linbit.com
Tue, 25 May 2004 15:53:00 +0200 (CEST)


DRBD CVS committal

Author  : phil
Module  : drbd

Dir     : drbd/drbd


Modified Files:
      Tag: rel-0_7-branch
	drbd_main.c 


Log Message:
* Removed an outdated comment from the Linux-2.4.x version of drbd_unplug_fn()
* In case we just detached after an IO error, we may not call drbd_kick_lo()

===================================================================
RCS file: /var/lib/cvs/drbd/drbd/drbd/drbd_main.c,v
retrieving revision 1.73.2.180
retrieving revision 1.73.2.181
diff -u -3 -r1.73.2.180 -r1.73.2.181
--- drbd_main.c	19 May 2004 19:52:47 -0000	1.73.2.180
+++ drbd_main.c	25 May 2004 13:52:55 -0000	1.73.2.181
@@ -1098,20 +1098,6 @@
 	struct Drbd_Conf* mdev = (drbd_dev*)data;
 	int i;
 
-	/* In case the receiver calls run_task_queue(&tq_disk) itself,
-	   in order to flush blocks to the ll_dev (for a device in
-	   secondary state), it could happen that it has to send the
-	   WRITE_HINT for an other device (which is in primary state).
-	   This could lead to a distributed deadlock!!
-	 */
-
-	for (i = 0; i < minor_count; i++) {
-		if(current == drbd_conf[i].receiver.task) {
-			queue_task(&mdev->write_hint_tq, &tq_disk);
-			return;
-		}
-	}
-
 	spin_lock_irq(&mdev->req_lock);
 	if (list_empty(&mdev->unplug_work.list))
 		_drbd_queue_work_front(&mdev->data.work,&mdev->unplug_work);
@@ -1149,8 +1135,8 @@
 			_drbd_queue_work_front(&mdev->data.work,&mdev->unplug_work);
 		spin_unlock_irq(&mdev->req_lock);
 	}
-	/* allways */
-	drbd_kick_lo(mdev);
+
+	if(!test_bit(DISKLESS,&mdev->flags)) drbd_kick_lo(mdev);
 }
 #endif