]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: remove btrfs_dev_replace::read_locks
authorDavid Sterba <dsterba@suse.com>
Fri, 24 Aug 2018 15:32:29 +0000 (17:32 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:37 +0000 (17:23 +0200)
commita022d3f703a257aa1fa0fe895d8995c2d3399d8e
treef94ff5ae016c6ca99f75c5ae2de455c065d75730
parentf79c225305026c347b1c54388517666b8012a513
btrfs: remove btrfs_dev_replace::read_locks

This member seems to be copied from the extent_buffer locking scheme and
is at least used to assert that the read lock/unlock is properly nested.
In some way. While the _inc/_dec are called inside the read lock
section, the asserts are both inside and outside, so the ordering is not
guaranteed and we can see read/inc/dec ordered in any way
(theoretically).

A missing call of btrfs_dev_replace_clear_lock_blocking could cause
unexpected read_locks count, so this at least looks like a valid
assertion, but this will become unnecessary with later updates.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/dev-replace.c
fs/btrfs/disk-io.c