btrfs: remove duplicated parameters from submit_data_read_repair()
authorQu Wenruo <wqu@suse.com>
Sun, 22 May 2022 11:47:49 +0000 (13:47 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Jul 2022 15:44:33 +0000 (17:44 +0200)
commitfd5a6f63cb29dd2c75e59c6dd60650f398855ecf
treea9eb511377c97c49e0628f62a7a2f040f2870943
parentae643a74ebdb150b004601d0d5fe5a1faba9b04d
btrfs: remove duplicated parameters from submit_data_read_repair()

The function submit_data_read_repair() is only called for buffered data
read path, thus those members can be calculated using bvec directly:

- start
  start = page_offset(bvec->bv_page) + bvec->bv_offset;

- end
  end = start + bvec->bv_len - 1;

- page
  page = bvec->bv_page;

- pgoff
  pgoff = bvec->bv_offset;

Thus we can safely replace those 4 parameters with just one bio_vec.

Also remove the unused return value.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
[hch: also remove the return value]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c