Skip to content
Commit deaf7e1c authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman
Browse files

staging/lustre/lnet: Don't call roundup_pow_of_two on zero in LNetEQAlloc



roundup_pow_of_two return when called on a zero argument is
undefined, so don't call it like that.

This fixes a problem introduced by commit 322489d9
("staging/lustre: Use roundup_pow_of_two() in LNetEQAlloc()")
since 0 is a valid count parameter for LNetEQAlloc. Also manifesting
itself as an annoying kernel warning:
LNet: 3486:0:(lib-eq.c:85:LNetEQAlloc()) EQ callback is guaranteed to get every event, do you still want to set eqcount 1 for polling event which will have locking overhead? Please contact with developer to confirm

Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
CC: Pekka Enberg <penberg@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent da33f1dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment