X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fldlm%2Fldlm_lib.c;h=290005ec24338c841a6331aa7aa28c2752890517;hp=19883b2b0238cd5488a60655790dbd5343a75933;hb=27be04d33db216e576486b2db6e1cb54aed60006;hpb=e528feb1793e744c63c2cd137d11418c513eb92d diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 19883b2..290005e 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -1107,14 +1107,18 @@ dont_check_exports: &export->exp_connection->c_peer.nid, &export->exp_nid_hash); } - /** - class_disconnect->class_export_recovery_cleanup() race - */ + if (target->obd_recovering && !export->exp_in_recovery) { int has_transno; __u64 transno = data->ocd_transno; cfs_spin_lock(&export->exp_lock); + /* possible race with class_disconnect_stale_exports, + * export may be already in the eviction process */ + if (export->exp_failed) { + cfs_spin_unlock(&export->exp_lock); + GOTO(out, rc = -ENODEV); + } export->exp_in_recovery = 1; export->exp_req_replay_needed = 1; export->exp_lock_replay_needed = 1;