]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: rename extent_buffer::lock_nested to extent_buffer::lock_recursed
authorJosef Bacik <josef@toxicpanda.com>
Thu, 20 Aug 2020 15:46:00 +0000 (11:46 -0400)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:12:15 +0000 (12:12 +0200)
commit2d5b0f2f860c30ec37f4f6d68a6a7fbe4a17ec37
treeed5c08b39452dae302db27ad6c662fb9c94d8188
parentf1d08c897a30a1842a6e483f89077bb4cd2362f3
btrfs: rename extent_buffer::lock_nested to extent_buffer::lock_recursed

Nested locking with lockdep and everything else refers to lock hierarchy
within the same lock map.  This is how we indicate the same locks for
different objects are ok to take in a specific order, for our use case
that would be to take the lock on a leaf and then take a lock on an
adjacent leaf.

What ->lock_nested _actually_ refers to is if we happen to already be
holding the write lock on the extent buffer and we're allowing a read
lock to be taken on that extent buffer, which is recursion.  Rename this
so we don't get confused when we switch to a rwsem and have to start
using the _nested helpers.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h
fs/btrfs/locking.c