summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.h
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-08-24 16:24:26 +0200
committerDavid Sterba <dsterba@suse.com>2019-04-29 19:02:21 +0200
commitc79adfc085c0662385cfcb55f15590303212e8e9 (patch)
tree56de865729349310e8e70178deb57a392104a757 /fs/btrfs/extent_io.h
parente3f153886702302482918a3788ba3bb24a37a4aa (diff)
downloadlinux-c79adfc085c0662385cfcb55f15590303212e8e9.tar.gz
linux-c79adfc085c0662385cfcb55f15590303212e8e9.tar.bz2
linux-c79adfc085c0662385cfcb55f15590303212e8e9.zip
btrfs: use assertion helpers for extent buffer write lock counters
Use the helpers where open coded. On non-debug builds, the warnings will not trigger and extent_buffer::write_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.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/extent_io.h b/fs/btrfs/extent_io.h
index 41c5d0e9dc75..43a9530279db 100644
--- a/fs/btrfs/extent_io.h
+++ b/fs/btrfs/extent_io.h
@@ -160,8 +160,6 @@ struct extent_buffer {
struct rcu_head rcu_head;
pid_t lock_owner;
- /* count of read lock holders on the extent buffer */
- atomic_t write_locks;
atomic_t blocking_writers;
atomic_t blocking_readers;
short lock_nested;
@@ -185,6 +183,7 @@ struct extent_buffer {
atomic_t spinning_writers;
atomic_t spinning_readers;
atomic_t read_locks;
+ atomic_t write_locks;
struct list_head leak_list;
#endif
};