staging: lustre: return +ve for blocked lnet message
commitec5fb5be77daedd4a9b668e8e4adc8a7228405fe
authorLiang Zhen <liang.zhen@intel.com>
Mon, 15 Feb 2016 15:25:50 +0000 (15 10:25 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:29:23 +0000 (20 14:29 -0800)
tree093c2066037cc7ace85c110db90b1524568db7a9
parent060c2820d0a73c092668957e6831720b83f44efa
staging: lustre: return +ve for blocked lnet message

returned value of lnet_post_send_locked and
lnet_post_routed_recv_locked are changed to -ve by:
http://review.whamcloud.com/#/c/9369/

this is wrong because callers rely on +ve to identify blocked
message which is not a failure.

To respect linux kernel coding style and not use positive error
code, this patch adds two macros as non-error returned values of
these functions:
    LNET_CREDIT_OK    has credit for message
    LNET_CREDIT_WAIT  no credit and message is blocked

both these functions will return these two values instead of 0
and EAGAIN

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5151
Reviewed-on: http://review.whamcloud.com/10625
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/lib-move.c