Btrfs: fix spinlock assertions on UP systems
[safe/jmp/linux-2.6] / fs / btrfs / locking.c
index 85506c4..47b0a88 100644 (file)
@@ -220,8 +220,8 @@ int btrfs_tree_unlock(struct extent_buffer *eb)
        return 0;
 }
 
-int btrfs_tree_locked(struct extent_buffer *eb)
+void btrfs_assert_tree_locked(struct extent_buffer *eb)
 {
-       return test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags) ||
-                       spin_is_locked(&eb->lock);
+       if (!test_bit(EXTENT_BUFFER_BLOCKING, &eb->bflags))
+               assert_spin_locked(&eb->lock);
 }