target: avoid accessing .bi_vcnt directly
authorMing Lei <tom.leiming@gmail.com>
Fri, 11 Nov 2016 12:05:32 +0000 (20:05 +0800)
committerJens Axboe <axboe@fb.com>
Tue, 22 Nov 2016 15:57:55 +0000 (08:57 -0700)
commit84c8590646d5b35804bac60eb58b145839b5893e
tree0f465eebb030ac1b2a5295b6c13d1c8d92c9b0c2
parent2c73a603cd0722c0594afc9efa0a617204303348
target: avoid accessing .bi_vcnt directly

When the bio is full, bio_add_pc_page() will return zero,
so use this information tell when the bio is full.

Also replace access to .bi_vcnt for pr_debug() with bio_segments().

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/target/target_core_pscsi.c