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)
commit3280f874576d31b03fe19cbcc23585d96feb4ceb
treef94ff5ae016c6ca99f75c5ae2de455c065d75730
parentf556faa46eb4e96d0d0772e74ecf66781e132f72
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