const lnet_nid_t *nid = arg->key;
const struct obd_export *exp = obj;
- if (exp->exp_connection->c_peer.nid == *nid && !exp->exp_failed)
+ if (exp->exp_connection->c_peer.nid == *nid)
return 0;
return -ESRCH;
class_export_put(exp);
}
-const struct rhashtable_params nid_hash_params = {
+static const struct rhashtable_params nid_hash_params = {
.key_len = sizeof(lnet_nid_t),
.head_offset = offsetof(struct obd_export, exp_nid_hash),
.obj_hashfn = nid_keyhash,
}
rhl_for_each_entry_rcu(exp, tmp, exports, exp_nid_hash) {
- if (cb(exp, data))
+ if (!exp->exp_failed && cb(exp, data))
ret++;
}