]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8b50f609c2c6c38a6a79cc88a5461b5d91f96fc2
treea9eb511377c97c49e0628f62a7a2f040f2870943
parent90c8801bea0ecfe1075983484de103fe9b9e4fb4
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