Whamcloud - gitweb
LU-1346 libcfs: cleanup waitq related primitives
[fs/lustre-release.git] / lnet / klnds / ptllnd / ptllnd_tx.c
index fa2b392..9151d45 100644 (file)
@@ -512,15 +512,15 @@ kptllnd_tx_callback(ptl_event_t *ev)
 
        spin_unlock_irqrestore(&peer->peer_lock, flags);
 
-        /* drop peer's ref, but if it was the last one... */
-        if (cfs_atomic_dec_and_test(&tx->tx_refcount)) {
-                /* ...finalize it in thread context! */
+       /* drop peer's ref, but if it was the last one... */
+       if (cfs_atomic_dec_and_test(&tx->tx_refcount)) {
+               /* ...finalize it in thread context! */
                spin_lock_irqsave(&kptllnd_data.kptl_sched_lock, flags);
 
-                cfs_list_add_tail(&tx->tx_list, &kptllnd_data.kptl_sched_txq);
-                cfs_waitq_signal(&kptllnd_data.kptl_sched_waitq);
+               cfs_list_add_tail(&tx->tx_list, &kptllnd_data.kptl_sched_txq);
+               wake_up(&kptllnd_data.kptl_sched_waitq);
 
                spin_unlock_irqrestore(&kptllnd_data.kptl_sched_lock,
-                                           flags);
-        }
+                                          flags);
+       }
 }