Merge branch 'linux-2.6' into for-2.6.22
[sfrench/cifs-2.6.git] / drivers / macintosh / smu.c
index 135f22eb1ad4bc8500ddc7a38c3023cac882ed52..a98a328b1cfcf335a637079cbc6c3b189c8c27a1 100644 (file)
@@ -1259,9 +1259,9 @@ static int smu_release(struct inode *inode, struct file *file)
                        set_current_state(TASK_UNINTERRUPTIBLE);
                        if (pp->cmd.status != 1)
                                break;
-                       spin_lock_irqsave(&pp->lock, flags);
-                       schedule();
                        spin_unlock_irqrestore(&pp->lock, flags);
+                       schedule();
+                       spin_lock_irqsave(&pp->lock, flags);
                }
                set_current_state(TASK_RUNNING);
                remove_wait_queue(&pp->wait, &wait);