diff options
author | David Sterba <dsterba@suse.com> | 2018-08-24 16:31:17 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 19:02:21 +0200 |
commit | ed1b4ed79df258f08f16eac4a4fb96dc6d1a0f3a (patch) | |
tree | 80aac814d09c7fc96e0975e4150f834def45678a /fs/btrfs/locking.c | |
parent | btrfs: use assertion helpers for extent buffer write lock counters (diff) | |
download | linux-ed1b4ed79df258f08f16eac4a4fb96dc6d1a0f3a.tar.xz linux-ed1b4ed79df258f08f16eac4a4fb96dc6d1a0f3a.zip |
btrfs: switch extent_buffer::lock_nested to bool
The member is tracking simple status of the lock, we can use bool for
that and make some room for further space reduction in the structure.
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/locking.c')
-rw-r--r-- | fs/btrfs/locking.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index 3f7b5989e31e..6df03ba36026 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c @@ -172,7 +172,7 @@ again: * called on a partly (write-)locked tree. */ BUG_ON(eb->lock_nested); - eb->lock_nested = 1; + eb->lock_nested = true; read_unlock(&eb->lock); return; } @@ -261,7 +261,7 @@ void btrfs_tree_read_unlock(struct extent_buffer *eb) * field only matters to the lock owner. */ if (eb->lock_nested && current->pid == eb->lock_owner) { - eb->lock_nested = 0; + eb->lock_nested = false; return; } btrfs_assert_tree_read_locked(eb); @@ -282,7 +282,7 @@ void btrfs_tree_read_unlock_blocking(struct extent_buffer *eb) * field only matters to the lock owner. */ if (eb->lock_nested && current->pid == eb->lock_owner) { - eb->lock_nested = 0; + eb->lock_nested = false; return; } btrfs_assert_tree_read_locked(eb); |