btrfs: use assertion helpers for spinning readers
[sfrench/cifs-2.6.git] / fs / btrfs / extent_io.c
index fc0451c3e24e485cb3be0779eb0448cbf8a68c8c..f010475f74fdfeda95d85cd8df4963ab458ed740 100644 (file)
@@ -4681,7 +4681,6 @@ __alloc_extent_buffer(struct btrfs_fs_info *fs_info, u64 start,
        atomic_set(&eb->read_locks, 0);
        atomic_set(&eb->blocking_readers, 0);
        atomic_set(&eb->blocking_writers, 0);
-       atomic_set(&eb->spinning_readers, 0);
        eb->lock_nested = 0;
        init_waitqueue_head(&eb->write_lock_wq);
        init_waitqueue_head(&eb->read_lock_wq);
@@ -4701,6 +4700,7 @@ __alloc_extent_buffer(struct btrfs_fs_info *fs_info, u64 start,
 
 #ifdef CONFIG_BTRFS_DEBUG
        atomic_set(&eb->spinning_writers, 0);
+       atomic_set(&eb->spinning_readers, 0);
 #endif
 
        return eb;