Whamcloud - gitweb
b=19906
[fs/lustre-release.git] / lustre / obdclass / cl_object.c
index cea73b0..4838a0a 100644 (file)
@@ -370,6 +370,22 @@ void cl_object_prune(const struct lu_env *env, struct cl_object *obj)
 }
 EXPORT_SYMBOL(cl_object_prune);
 
+/**
+ * Check if the object has locks.
+ */
+int cl_object_has_locks(struct cl_object *obj)
+{
+        struct cl_object_header *head = cl_object_header(obj);
+        int has;
+
+        spin_lock(&head->coh_lock_guard);
+        has = list_empty(&head->coh_locks);
+        spin_unlock(&head->coh_lock_guard);
+
+        return (has == 0);
+}
+EXPORT_SYMBOL(cl_object_has_locks);
+
 void cache_stats_init(struct cache_stats *cs, const char *name)
 {
         cs->cs_name = name;
@@ -464,7 +480,7 @@ int cl_site_stats_print(const struct cl_site *site, char *page, int count)
                 [CLS_QUEUING]   = "q",
                 [CLS_ENQUEUED]  = "e",
                 [CLS_HELD]      = "h",
-                [CLS_UNLOCKING] = "u",
+                [CLS_INTRANSIT] = "t",
                 [CLS_CACHED]    = "c",
                 [CLS_FREEING]   = "f"
         };