Whamcloud - gitweb
LU-2129 llog: protect llog write against concurrent read
[fs/lustre-release.git] / lustre / obdclass / cl_object.c
index 83f65d0..4b0e303 100644 (file)
@@ -50,9 +50,6 @@
  */
 
 #define DEBUG_SUBSYSTEM S_CLASS
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
 
 #include <libcfs/libcfs.h>
 /* class_put_type() */
@@ -91,8 +88,8 @@ int cl_object_header_init(struct cl_object_header *h)
                 cfs_spin_lock_init(&h->coh_page_guard);
                 cfs_spin_lock_init(&h->coh_lock_guard);
                 cfs_spin_lock_init(&h->coh_attr_guard);
-                cfs_lockdep_set_class(&h->coh_attr_guard, &cl_page_guard_class);
-                cfs_lockdep_set_class(&h->coh_attr_guard, &cl_lock_guard_class);
+                cfs_lockdep_set_class(&h->coh_page_guard, &cl_page_guard_class);
+                cfs_lockdep_set_class(&h->coh_lock_guard, &cl_lock_guard_class);
                 cfs_lockdep_set_class(&h->coh_attr_guard, &cl_attr_guard_class);
                 h->coh_pages = 0;
                 /* XXX hard coded GFP_* mask. */
@@ -543,7 +540,7 @@ static CFS_LIST_HEAD(cl_envs);
 static unsigned cl_envs_cached_nr  = 0;
 static unsigned cl_envs_cached_max = 128; /* XXX: prototype: arbitrary limit
                                            * for now. */
-static cfs_spinlock_t cl_envs_guard = CFS_SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cl_envs_guard);
 
 struct cl_env {
         void             *ce_magic;