Commit bd9cb12f authored by Riccardo Lucchese's avatar Riccardo Lucchese Committed by Greg Kroah-Hartman

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: default avatarRiccardo Lucchese <riccardo.lucchese@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f0ca3e87
......@@ -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)
{
int rc = 0;
int rc;
struct lov_tgt_desc *tgt;
mutex_lock(&lov->lov_lock);
if (lov->lov_tgts[idx] == NULL ||
lov->lov_tgts[idx]->ltd_active ||
(lov->lov_tgts[idx]->ltd_exp != NULL &&
class_exp2cliimp(lov->lov_tgts[idx]->ltd_exp)->imp_connect_tried))
rc = 1;
tgt = lov->lov_tgts[idx];
rc = !tgt || tgt->ltd_active ||
(tgt->ltd_exp &&
class_exp2cliimp(tgt->ltd_exp)->imp_connect_tried);
mutex_unlock(&lov->lov_lock);
return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment