summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-08-24 15:57:38 +0200
committerDavid Sterba <dsterba@suse.com>2019-04-29 19:02:21 +0200
commitafd495a8264fb25cef49834b5c3559b8aaa612ee (patch)
tree8196e1c261b761ac8e4bcec38ee896bb8ce538fd /fs/btrfs/extent_io.h
parentbtrfs: add assertion helpers for spinning readers (diff)
downloadlinux-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.h')
-rw-r--r--fs/btrfs/extent_io.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index 3577ef33bc36..89e56df64d6c 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -165,7 +165,6 @@ struct extent_buffer {
atomic_t read_locks;
atomic_t blocking_writers;
atomic_t blocking_readers;
- atomic_t spinning_readers;
short lock_nested;
/* >= 0 if eb belongs to a log tree, -1 otherwise */
short log_index;
@@ -185,6 +184,7 @@ struct extent_buffer {
struct page *pages[INLINE_EXTENT_BUFFER_PAGES];
#ifdef CONFIG_BTRFS_DEBUG
atomic_t spinning_writers;
+ atomic_t spinning_readers;
struct list_head leak_list;
#endif
};