Whamcloud - gitweb
LU-2683 lov: release all locks in closure to release sublock
[fs/lustre-release.git] / lustre / ptlrpc / llog_net.c
index 679f99f..ffc378b 100644 (file)
@@ -26,6 +26,8 @@
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -95,7 +97,7 @@ int llog_origin_connect(struct llog_ctxt *ctxt,
         }
 
         lgr->lgr_gen = ctxt->loc_gen;
-       rc = llog_add(NULL, ctxt, &lgr->lgr_hdr, NULL, NULL, 1);
+       rc = llog_obd_add(NULL, ctxt, &lgr->lgr_hdr, NULL, NULL, 1);
         OBD_FREE_PTR(lgr);
         rc1 = fsfilt_commit(ctxt->loc_exp->exp_obd, inode, handle, 0);
         if (rc != 1 || rc1 != 0) {
@@ -155,7 +157,7 @@ int llog_receptor_accept(struct llog_ctxt *ctxt, struct obd_import *imp)
         ENTRY;
 
         LASSERT(ctxt);
-        cfs_mutex_lock(&ctxt->loc_mutex);
+       mutex_lock(&ctxt->loc_mutex);
         if (ctxt->loc_imp != imp) {
                 if (ctxt->loc_imp) {
                         CWARN("changing the import %p - %p\n",
@@ -164,7 +166,7 @@ int llog_receptor_accept(struct llog_ctxt *ctxt, struct obd_import *imp)
                 }
                 ctxt->loc_imp = class_import_get(imp);
         }
-        cfs_mutex_unlock(&ctxt->loc_mutex);
+       mutex_unlock(&ctxt->loc_mutex);
         RETURN(0);
 }
 EXPORT_SYMBOL(llog_receptor_accept);
@@ -188,13 +190,13 @@ int llog_initiator_connect(struct llog_ctxt *ctxt)
         new_imp = ctxt->loc_obd->u.cli.cl_import;
         LASSERTF(ctxt->loc_imp == NULL || ctxt->loc_imp == new_imp,
                  "%p - %p\n", ctxt->loc_imp, new_imp);
-        cfs_mutex_lock(&ctxt->loc_mutex);
+       mutex_lock(&ctxt->loc_mutex);
         if (ctxt->loc_imp != new_imp) {
                 if (ctxt->loc_imp)
                         class_import_put(ctxt->loc_imp);
                 ctxt->loc_imp = class_import_get(new_imp);
         }
-        cfs_mutex_unlock(&ctxt->loc_mutex);
+       mutex_unlock(&ctxt->loc_mutex);
         RETURN(0);
 }
 EXPORT_SYMBOL(llog_initiator_connect);