staging/lustre: don't assert ln_refcount in LNetGetId
authorPeng Tao <bergwolf@gmail.com>
Mon, 15 Jul 2013 14:27:07 +0000 (22:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 19:23:57 +0000 (12:23 -0700)
commit4b1e84ed8883d4f24f99417cb84165ff77a99d66
tree744bed601c9b15aacaa74e7bd2566d4226680597
parent4d2d6e29a8d56bd05cc7ea30ddfb4d3f75290cfe
staging/lustre: don't assert ln_refcount in LNetGetId

If LNetNIInit() fails, we'll get zero ln_refcount. So fail
LNetGetId() properly instead of asserting.

We can get to it when socklnd fails to scan network interfaces,
which is possible if Lustre is builtin.

Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/api-ni.c