btrfs: add assertion helpers for extent buffer write lock counters
authorDavid Sterba <dsterba@suse.com>
Fri, 24 Aug 2018 14:20:02 +0000 (16:20 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:21 +0000 (19:02 +0200)
commite3f153886702302482918a3788ba3bb24a37a4aa
treee14a716a1f40cfe67d09eacc37018dea15aec259
parent5c9c799ab78336a4161b16126952a7e1320a8c77
btrfs: add assertion helpers for extent buffer write lock counters

The write_locks are a simple counter to track locking balance and used
to assert tree locks.  Add helpers to make it conditionally work only in
DEBUG builds.  Will be used in followup patches.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/locking.c