staging: lustre: lov: Cleanup lov_check_set() in lov_request.c
Make the code clearer by introducing a local variable and removing the unnecessary 'if' statement. Signed-off-by: Riccardo Lucchese <riccardo.lucchese@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f0ca3e87cc
commit
bd9cb12feb
1 changed files with 6 additions and 6 deletions
|
@ -140,14 +140,14 @@ void lov_set_add_req(struct lov_request *req, struct lov_request_set *set)
|
||||||
|
|
||||||
static int lov_check_set(struct lov_obd *lov, int idx)
|
static int lov_check_set(struct lov_obd *lov, int idx)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc;
|
||||||
|
struct lov_tgt_desc *tgt;
|
||||||
mutex_lock(&lov->lov_lock);
|
mutex_lock(&lov->lov_lock);
|
||||||
|
|
||||||
if (lov->lov_tgts[idx] == NULL ||
|
tgt = lov->lov_tgts[idx];
|
||||||
lov->lov_tgts[idx]->ltd_active ||
|
rc = !tgt || tgt->ltd_active ||
|
||||||
(lov->lov_tgts[idx]->ltd_exp != NULL &&
|
(tgt->ltd_exp &&
|
||||||
class_exp2cliimp(lov->lov_tgts[idx]->ltd_exp)->imp_connect_tried))
|
class_exp2cliimp(tgt->ltd_exp)->imp_connect_tried);
|
||||||
rc = 1;
|
|
||||||
|
|
||||||
mutex_unlock(&lov->lov_lock);
|
mutex_unlock(&lov->lov_lock);
|
||||||
return rc;
|
return rc;
|
||||||
|
|
Loading…
Add table
Reference in a new issue