Whamcloud - gitweb
b=23120 eliminate defunct changelog_send_thread processes
[fs/lustre-release.git] / lustre / lclient / lcommon_misc.c
index 24e896d..5b85217 100644 (file)
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -102,13 +102,13 @@ int cl_ocd_update(struct obd_device *host,
                 flags = cli->cl_import->imp_connect_data.ocd_connect_flags;
                 CDEBUG(D_SUPER, "Changing connect_flags: "LPX64" -> "LPX64"\n",
                        lco->lco_flags, flags);
-                mutex_down(&lco->lco_lock);
+                cfs_mutex_down(&lco->lco_lock);
                 lco->lco_flags &= flags;
                 /* for each osc event update ea size */
                 if (lco->lco_dt_exp)
                         cl_init_ea_size(lco->lco_md_exp, lco->lco_dt_exp);
 
-                mutex_up(&lco->lco_lock);
+                cfs_mutex_up(&lco->lco_lock);
                 result = 0;
         } else {
                 CERROR("unexpected notification from %s %s!\n",
@@ -154,8 +154,9 @@ int cl_get_grouplock(struct cl_object *obj, unsigned long gid, int nonblock,
         descr->cld_mode = CLM_GROUP;
 
         enqflags = CEF_MUST | (nonblock ? CEF_NONBLOCK : 0);
-        lock = cl_lock_request(env, io, descr, enqflags,
-                               GROUPLOCK_SCOPE, cfs_current());
+        descr->cld_enq_flags = enqflags;
+
+        lock = cl_lock_request(env, io, descr, GROUPLOCK_SCOPE, cfs_current());
         if (IS_ERR(lock)) {
                 cl_io_fini(env, io);
                 cl_env_put(env, &refcheck);