diff options
author | David Sterba <dsterba@suse.com> | 2018-08-24 17:15:51 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 20:02:21 +0300 |
commit | 5c9c799ab78336a4161b16126952a7e1320a8c77 (patch) | |
tree | c419a5edcab793e6ed655ace2cb53649262be61e /fs/btrfs/extent_io.h | |
parent | 58a2ddaedbf74b8a209426128c130cc9f0dbd11b (diff) | |
download | linux-5c9c799ab78336a4161b16126952a7e1320a8c77.tar.xz |
btrfs: use assertion helpers for extent buffer read lock counters
Use the helpers where open coded. On non-debug builds, the warnings will
not trigger and extent_buffer::read_locks 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 89e56df64d6c..41c5d0e9dc75 100644 --- a/fs/btrfs/extent_io.h +++ b/fs/btrfs/extent_io.h @@ -162,7 +162,6 @@ struct extent_buffer { /* count of read lock holders on the extent buffer */ atomic_t write_locks; - atomic_t read_locks; atomic_t blocking_writers; atomic_t blocking_readers; short lock_nested; @@ -185,6 +184,7 @@ struct extent_buffer { #ifdef CONFIG_BTRFS_DEBUG atomic_t spinning_writers; atomic_t spinning_readers; + atomic_t read_locks; struct list_head leak_list; #endif }; |