diff options
author | David Sterba | 2018-08-24 17:33:58 +0200 |
---|---|---|
committer | David Sterba | 2018-10-15 17:23:37 +0200 |
commit | 7fb2eced105f67676eb86473d5b1ce6a96f6eab4 (patch) | |
tree | 3b500f98ec26bd8989c81ab8bfdb506ced9937d7 /fs/btrfs/dev-replace.c | |
parent | 3280f874576d31b03fe19cbcc23585d96feb4ceb (diff) |
btrfs: open code btrfs_dev_replace_clear_lock_blocking
There's a single caller and the function name does not say it's actually
taking the lock, so open coding makes it more explicit.
For now, btrfs_dev_replace_read_lock is used instead of read_lock so
it's paired with the unlocking wrapper in the same block.
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
-rw-r--r-- | fs/btrfs/dev-replace.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index 702fe6a65075..a79e8d67f768 100644 --- a/fs/btrfs/dev-replace.c +++ b/fs/btrfs/dev-replace.c @@ -998,18 +998,6 @@ void btrfs_dev_replace_set_lock_blocking( read_unlock(&dev_replace->lock); } -/* acquire read lock and dec blocking cnt */ -void btrfs_dev_replace_clear_lock_blocking( - struct btrfs_dev_replace *dev_replace) -{ - /* only set blocking for read lock */ - ASSERT(atomic_read(&dev_replace->blocking_readers) > 0); - read_lock(&dev_replace->lock); - /* Barrier implied by atomic_dec_and_test */ - if (atomic_dec_and_test(&dev_replace->blocking_readers)) - cond_wake_up_nomb(&dev_replace->read_lock_wq); -} - void btrfs_bio_counter_inc_noblocked(struct btrfs_fs_info *fs_info) { percpu_counter_inc(&fs_info->bio_counter); |