Whamcloud - gitweb
LU-7766 lnet: Don't call roundup_pow_of_two on zero in LNetEQAlloc
[fs/lustre-release.git] / lnet / lnet / lib-eq.c
index 709ffc9..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 = roundup_pow_of_two(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, "