diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c
index 9c73ecf3e05ecd147720927880d87195eee7b4db..3bc0fdd3fb1a519e6f8eb252d1ddc503ab0eb502 100644
--- a/lustre/ldlm/ldlm_request.c
+++ b/lustre/ldlm/ldlm_request.c
@@ -509,11 +509,10 @@ struct ptlrpc_request *ldlm_prep_enqueue_req(struct obd_export *exp,
                  * will incrment @lock_count according to the lock handle amount
                  * actually written to the buffer. */
                 dlm->lock_count = LDLM_ENQUEUE_CANCEL_OFF;
-        }
-        if (req)
                 ldlm_cli_cancel_list(cancels, count, req, DLM_LOCKREQ_OFF);
-        else
+        } else {
                 ldlm_lock_list_put(cancels, l_bl_ast, count);
+        }
         RETURN(req);
 }
 
diff --git a/lustre/mdc/mdc_reint.c b/lustre/mdc/mdc_reint.c
index bc8ef76cb80282bf4ef8cfa3428218a7dfe9fd41..c7ed24b5a7cd3cdf0fad004cc8e49c3e6edd6bc8 100644
--- a/lustre/mdc/mdc_reint.c
+++ b/lustre/mdc/mdc_reint.c
@@ -127,7 +127,7 @@ int mdc_setattr(struct obd_export *exp, struct mdc_op_data *op_data,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
                               MDS_REINT, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 3);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -186,7 +186,7 @@ int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
                               MDS_REINT, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 3);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -242,7 +242,7 @@ int mdc_unlink(struct obd_export *exp, struct mdc_op_data *op_data,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
                               MDS_REINT, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 2);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -286,7 +286,7 @@ int mdc_link(struct obd_export *exp, struct mdc_op_data *op_data,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
                               MDS_REINT, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 2);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -336,7 +336,7 @@ int mdc_rename(struct obd_export *exp, struct mdc_op_data *op_data,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
                               MDS_REINT, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 3);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c
index 3b02c24f3bb4c583919a094812e72336d4604b43..c8dd61811194298eaa2e1a9c0b26f28f293c8ca5 100644
--- a/lustre/osc/osc_request.c
+++ b/lustre/osc/osc_request.c
@@ -601,7 +601,7 @@ static int osc_destroy(struct obd_export *exp, struct obdo *oa,
         }
         req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION,
                               OST_DESTROY, bufcount, size, NULL);
-        if (req)
+        if (exp_connect_cancelset(exp) && req)
                 ldlm_cli_cancel_list(&cancels, count, req, REQ_REC_OFF + 1);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);