@@ -904,13 +904,15 @@ int mdc_enqueue_base(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
if (it->it_op && (int)lockrep->lock_policy_res2 == -EINPROGRESS) {
mdc_clear_replay_flag(req, rc);
ptlrpc_req_finished(req);
- resends++;
-
- CDEBUG(D_HA, "%s: resend:%d op:%d " DFID "/" DFID "\n",
- obddev->obd_name, resends, it->it_op,
- PFID(&op_data->op_fid1), PFID(&op_data->op_fid2));
-
if (generation == obddev->u.cli.cl_import->imp_generation) {
+ if (signal_pending(current))
+ return -EINTR;
+
+ resends++;
+ CDEBUG(D_HA, "%s: resend:%d op:%d "DFID"/"DFID"\n",
+ obddev->obd_name, resends, it->it_op,
+ PFID(&op_data->op_fid1),
+ PFID(&op_data->op_fid2));
goto resend;
} else {
CDEBUG(D_HA, "resend cross eviction\n");
@@ -231,17 +231,20 @@ int mdc_create(struct obd_export *exp, struct md_op_data *op_data,
level = LUSTRE_IMP_RECOVER;
goto resend;
} else if (rc == -EINPROGRESS) {
- /* Retry create infinitely until succeed or get other
- * error code.
+ /*
+ * Retry create infinitely until succeed or get other
+ * error code or interrupted.
*/
ptlrpc_req_finished(req);
- resends++;
-
- CDEBUG(D_HA, "%s: resend:%d create on " DFID "/" DFID "\n",
- exp->exp_obd->obd_name, resends,
- PFID(&op_data->op_fid1), PFID(&op_data->op_fid2));
-
if (generation == import->imp_generation) {
+ if (signal_pending(current))
+ return -EINTR;
+
+ resends++;
+ CDEBUG(D_HA, "%s: resend:%d create on "DFID"/"DFID"\n",
+ exp->exp_obd->obd_name, resends,
+ PFID(&op_data->op_fid1),
+ PFID(&op_data->op_fid2));
goto rebuild;
} else {
CDEBUG(D_HA, "resend cross eviction\n");