diff options
author | David Sterba <dsterba@suse.com> | 2018-08-24 14:56:28 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 19:02:20 +0200 |
commit | 843ccf9f46baff289946e897b11fd813de62d06f (patch) | |
tree | 6cd5a503bd2492124fe8fe4a463f5953d658df47 /fs/btrfs/extent_io.h | |
parent | e4e9fd0f326212ee3971418334c255a26c8a2735 (diff) |
btrfs: use assertion helpers for spinning writers
Use the helpers where open coded. On non-debug builds, the warnings will
not trigger and extent_buffer::spining_writers 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.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h index 1e5be66c7e0b..3577ef33bc36 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -166,7 +166,6 @@ struct extent_buffer { atomic_t blocking_writers; atomic_t blocking_readers; atomic_t spinning_readers; - atomic_t spinning_writers; short lock_nested; /* >= 0 if eb belongs to a log tree, -1 otherwise */ short log_index; @@ -185,6 +184,7 @@ struct extent_buffer { wait_queue_head_t read_lock_wq; struct page *pages[INLINE_EXTENT_BUFFER_PAGES]; #ifdef CONFIG_BTRFS_DEBUG + atomic_t spinning_writers; struct list_head leak_list; #endif }; |