Whamcloud - gitweb
LU-14352 various: only use wake_up_all() on exclusive waitqs
[fs/lustre-release.git] / lustre / obdclass / upcall_cache.c
index 5622410..b172cfa 100644 (file)
@@ -125,7 +125,7 @@ static int check_unlink_entry(struct upcall_cache *cache,
                        return 0;
 
                UC_CACHE_SET_EXPIRED(entry);
-               wake_up_all(&entry->ue_waitq);
+               wake_up(&entry->ue_waitq);
        } else if (!UC_CACHE_IS_INVALID(entry)) {
                UC_CACHE_SET_EXPIRED(entry);
        }
@@ -202,7 +202,7 @@ find_again:
                if (rc < 0) {
                        UC_CACHE_CLEAR_ACQUIRING(entry);
                        UC_CACHE_SET_INVALID(entry);
-                       wake_up_all(&entry->ue_waitq);
+                       wake_up(&entry->ue_waitq);
                        if (unlikely(rc == -EREMCHG)) {
                                put_entry(cache, entry);
                                GOTO(out, entry = ERR_PTR(rc));
@@ -217,7 +217,7 @@ find_again:
                              MAX_SCHEDULE_TIMEOUT;
                long left;
 
-               init_waitqueue_entry(&wait, current);
+               init_wait(&wait);
                add_wait_queue(&entry->ue_waitq, &wait);
                set_current_state(TASK_INTERRUPTIBLE);
                spin_unlock(&cache->uc_lock);
@@ -350,7 +350,7 @@ out:
        }
        UC_CACHE_CLEAR_ACQUIRING(entry);
        spin_unlock(&cache->uc_lock);
-       wake_up_all(&entry->ue_waitq);
+       wake_up(&entry->ue_waitq);
        put_entry(cache, entry);
 
        RETURN(rc);