Whamcloud - gitweb
Branch HEAD
authorvitaly <vitaly>
Wed, 1 Aug 2007 19:43:59 +0000 (19:43 +0000)
committervitaly <vitaly>
Wed, 1 Aug 2007 19:43:59 +0000 (19:43 +0000)
b=<bug>
i=green
i=shadow

handling of zero connect flags in self export for ELC code

lustre/ldlm/ldlm_request.c
lustre/mdc/mdc_reint.c
lustre/osc/osc_request.c

index c781b30..bf7d244 100644 (file)
@@ -517,11 +517,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, 0);
-        else
+        } else {
                 ldlm_lock_list_put(cancels, l_bl_ast, count);
+        }
         RETURN(req);
 }
 
index f14c7f6..6f8fc77 100644 (file)
@@ -138,7 +138,7 @@ int mdc_setattr(struct obd_export *exp, struct md_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 + 5, 0);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -217,7 +217,7 @@ int mdc_create(struct obd_export *exp, struct md_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 + 4, 0);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -298,7 +298,7 @@ int mdc_unlink(struct obd_export *exp, struct md_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, 0);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -354,7 +354,7 @@ int mdc_link(struct obd_export *exp, struct md_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 + 4, 0);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
@@ -419,7 +419,7 @@ int mdc_rename(struct obd_export *exp, struct md_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 + 5, 0);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);
index 88c46c5..16b78f9 100644 (file)
@@ -629,7 +629,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, 0);
         else
                 ldlm_lock_list_put(&cancels, l_bl_ast, count);