btrfs: use assertion helpers for extent buffer read lock counters
[sfrench/cifs-2.6.git] / fs / btrfs / extent_io.c
index f010475f74fdfeda95d85cd8df4963ab458ed740..c189b018ed693e25f6e9d54d65d4d58a9ba6d367 100644 (file)
@@ -4678,7 +4678,6 @@ __alloc_extent_buffer(struct btrfs_fs_info *fs_info, u64 start,
        eb->bflags = 0;
        rwlock_init(&eb->lock);
        atomic_set(&eb->write_locks, 0);
-       atomic_set(&eb->read_locks, 0);
        atomic_set(&eb->blocking_readers, 0);
        atomic_set(&eb->blocking_writers, 0);
        eb->lock_nested = 0;
@@ -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);
+       atomic_set(&eb->read_locks, 0);
 #endif
 
        return eb;