Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[linux-2.6-microblaze.git] / kernel / sched / wait.c
index fa0f9ad..c1e566a 100644 (file)
@@ -118,16 +118,12 @@ static void __wake_up_common_lock(struct wait_queue_head *wq_head, unsigned int
        bookmark.func = NULL;
        INIT_LIST_HEAD(&bookmark.entry);
 
-       spin_lock_irqsave(&wq_head->lock, flags);
-       nr_exclusive = __wake_up_common(wq_head, mode, nr_exclusive, wake_flags, key, &bookmark);
-       spin_unlock_irqrestore(&wq_head->lock, flags);
-
-       while (bookmark.flags & WQ_FLAG_BOOKMARK) {
+       do {
                spin_lock_irqsave(&wq_head->lock, flags);
                nr_exclusive = __wake_up_common(wq_head, mode, nr_exclusive,
                                                wake_flags, key, &bookmark);
                spin_unlock_irqrestore(&wq_head->lock, flags);
-       }
+       } while (bookmark.flags & WQ_FLAG_BOOKMARK);
 }
 
 /**