Description
smatch highlights these two redundant checks in ldlm.
ldlm_lock.c::ldlm_lock_enqueue:
} else if (rc != ELDLM_OK || (rc == ELDLM_OK && (*flags & LDLM_FL_INTENT_ONLY))) { ldlm_lock_destroy(lock); return rc; }
We probbly can just drop the other 'rc ==' check
ldlm_lib.c::client_connect_import():
rc = ptlrpc_connect_import(imp); if (rc != 0) { LASSERT(imp->imp_state == LUSTRE_IMP_DISCON); goto out_ldlm; } ... if (rc) { out_ldlm: cli->cl_conn_count--; class_disconnect(*exp);
We probably can drop the latter rc check now?