Update of /cvsroot/gc-linux/linux/drivers/block/gcn-di
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10107
Modified Files:
gcn-di.c
Log Message:
Fixed a misplaced check.
Index: gcn-di.c
===================================================================
RCS file: /cvsroot/gc-linux/linux/drivers/block/gcn-di/gcn-di.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gcn-di.c 3 Jul 2005 09:44:34 -0000 1.6
+++ gcn-di.c 3 Jul 2005 10:20:54 -0000 1.7
@@ -1342,7 +1342,7 @@
/* postpone a bit the motor off if there are pending commands */
spin_lock_irqsave(&ddev->lock, flags);
- if (!ddev->cmd && ddev->ref_count == 0) {
+ if (!ddev->cmd) {
ddev->cmd = cmd = &ddev->status;
spin_unlock_irqrestore(&ddev->lock, flags);
di_op_stopmotor(cmd, ddev);
@@ -1632,7 +1632,7 @@
* If we have a pending command, that's a previously scheduled
* motor off. Wait for it to terminate before going on.
*/
- if (ddev->cmd) {
+ if (ddev->cmd && ddev->ref_count == 0) {
cmd = ddev->cmd;
cmd->done_data = &complete;
cmd->done = di_wait_done;
|