lkml.org 
[lkml]   [2016]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 08/10] staging: lustre: change test to asser in LNetGetId
Date
The ln_refcount test was changed into an assert.

Signed-off-by: James Simmons <jsimmons@infradead.org>
---
drivers/staging/lustre/lnet/lnet/api-ni.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c
index 7395985..4843980 100644
--- a/drivers/staging/lustre/lnet/lnet/api-ni.c
+++ b/drivers/staging/lustre/lnet/lnet/api-ni.c
@@ -2090,9 +2090,7 @@ LNetGetId(unsigned int index, lnet_process_id_t *id)
int cpt;
int rc = -ENOENT;

- /* LNetNI initilization failed? */
- if (!the_lnet.ln_refcount)
- return rc;
+ LASSERT(the_lnet.ln_refcount > 0);

cpt = lnet_net_lock_current();

--
1.7.1
\
 
 \ /
  Last update: 2016-03-05 04:01    [W:0.017 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site