diff options
author | David Sterba <dsterba@suse.com> | 2018-08-24 15:57:38 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 19:02:21 +0200 |
commit | afd495a8264fb25cef49834b5c3559b8aaa612ee (patch) | |
tree | 8196e1c261b761ac8e4bcec38ee896bb8ce538fd /fs/btrfs/extent_io.c | |
parent | btrfs: add assertion helpers for spinning readers (diff) | |
download | linux-afd495a8264fb25cef49834b5c3559b8aaa612ee.tar.xz linux-afd495a8264fb25cef49834b5c3559b8aaa612ee.zip |
btrfs: use assertion helpers for spinning readers
Use the helpers where open coded. On non-debug builds, the warnings will
not trigger and extent_buffer::spining_readers become unused and can be
moved to the appropriate section, saving a few bytes.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index fc0451c3e24e..f010475f74fd 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -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; |