diff options
author | Josef Bacik <josef@toxicpanda.com> | 2020-08-20 11:46:10 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-12-08 15:54:01 +0100 |
commit | ac5887c8e013d6754d36e6d51dc03448ee0b0065 (patch) | |
tree | fa8e936af2eaf48321a72e6498c02280235b964c /fs/btrfs/disk-io.c | |
parent | 2ae0c2d80d25dae7658b64b93c271004bc8708e8 (diff) | |
download | lwn-ac5887c8e013d6754d36e6d51dc03448ee0b0065.tar.gz lwn-ac5887c8e013d6754d36e6d51dc03448ee0b0065.zip |
btrfs: locking: remove all the blocking helpers
Now that we're using a rw_semaphore we no longer need to indicate if a
lock is blocking or not, nor do we need to flip the entire path from
blocking to spinning. Remove these helpers and all the places they are
called.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index c70a52b44ceb..212806d59012 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -250,10 +250,8 @@ static int verify_parent_transid(struct extent_io_tree *io_tree, if (atomic) return -EAGAIN; - if (need_lock) { + if (need_lock) btrfs_tree_read_lock(eb); - btrfs_set_lock_blocking_read(eb); - } lock_extent_bits(io_tree, eb->start, eb->start + eb->len - 1, &cached_state); @@ -282,7 +280,7 @@ out: unlock_extent_cached(io_tree, eb->start, eb->start + eb->len - 1, &cached_state); if (need_lock) - btrfs_tree_read_unlock_blocking(eb); + btrfs_tree_read_unlock(eb); return ret; } @@ -1013,8 +1011,6 @@ void btrfs_clean_tree_block(struct extent_buffer *buf) percpu_counter_add_batch(&fs_info->dirty_metadata_bytes, -buf->len, fs_info->dirty_metadata_batch); - /* ugh, clear_extent_buffer_dirty needs to lock the page */ - btrfs_set_lock_blocking_write(buf); clear_extent_buffer_dirty(buf); } } |