Whamcloud - gitweb
LU-4257 llite: fix up iov_iter implementation
[fs/lustre-release.git] / lnet / lnet / lib-eq.c
index d5cc380..8e95154 100644 (file)
@@ -78,7 +78,8 @@ LNetEQAlloc(unsigned int count, lnet_eq_handler_t callback,
          * overflow, they don't skip entries, so the queue has the same
          * apparent capacity at all times */
 
-       count = cfs_power2_roundup(count);
+       if (count)
+               count = roundup_pow_of_two(count);
 
        if (callback != LNET_EQ_HANDLER_NONE && count != 0) {
                CWARN("EQ callback is guaranteed to get every event, "
@@ -331,7 +332,7 @@ __must_hold(&the_lnet.ln_eq_wait_lock)
        cfs_time_t      now;
 
        if (tms == 0)
-               return -1; /* don't want to wait and no new event */
+               return -ENXIO; /* don't want to wait and no new event */
 
        init_waitqueue_entry(&wl, current);
        set_current_state(TASK_INTERRUPTIBLE);