]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: avoid access to .bi_vcnt directly
authorMing Lei <ming.lei@redhat.com>
Mon, 18 Dec 2017 12:22:11 +0000 (20:22 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 6 Jan 2018 16:18:00 +0000 (09:18 -0700)
commit35719953a6fc7ea821b639318b28315b71050079
tree0a23c69b7926356efb1ac5d532655e9aa8953e33
parentca68cdc8f7cd8063fd6c01380e2de6816b110cf7
btrfs: avoid access to .bi_vcnt directly

BTRFS uses bio->bi_vcnt to figure out page numbers, this approach is no
longer valid once we start enabling multipage bvecs.
correct once we start to enable multipage bvec.

Use bio_nr_pages() to do that instead.

Cc: Chris Mason <clm@fb.com>
Cc: Josef Bacik <jbacik@fb.com>
Cc: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Acked-by: David Sterba <dsterba@suse.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/btrfs/extent_io.c
fs/btrfs/extent_io.h