Whamcloud - gitweb
LU-4199 libcfs: remove assertion of spin_is_locked()
[fs/lustre-release.git] / libcfs / include / libcfs / user-lock.h
index d0ff4ff..20f2006 100644 (file)
@@ -78,7 +78,7 @@
  * - spin_lock_bh(x)
  * - spin_unlock_bh(x)
  *
- * - spin_is_locked(x)
+ * - assert_spin_locked(x)
  * - spin_lock_irqsave(x, f)
  * - spin_unlock_irqrestore(x, f)
  *
@@ -99,10 +99,11 @@ void spin_lock_bh_init(spinlock_t *lock);
 void spin_lock_bh(spinlock_t *lock);
 void spin_unlock_bh(spinlock_t *lock);
 
-static inline int spin_is_locked(spinlock_t *l) { return 1; }
 static inline void spin_lock_irqsave(spinlock_t *l, unsigned long f) {}
 static inline void spin_unlock_irqrestore(spinlock_t *l, unsigned long f) {}
 
+#define assert_spin_locked(lock)       do { (void)(lock); } while (0)
+
 /*
  * Semaphore
  *