fs/buffer.c: use bvec iterator to truncate the bio
authorMing Lei <ming.lei@redhat.com>
Fri, 15 Feb 2019 11:13:15 +0000 (19:13 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 15 Feb 2019 15:40:11 +0000 (08:40 -0700)
commitf70f44640759728d6e31326acbee08ca22d1066f
treec8504310301fb51dbf8a28612385b69d40dcc29d
parent45a3fb95298b326ab8175f2bd97bd8666017b692
fs/buffer.c: use bvec iterator to truncate the bio

Once multi-page bvec is enabled, the last bvec may include more than one
page, this patch use mp_bvec_last_segment() to truncate the bio.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/buffer.c