diff options
author | 2016-02-26 23:40:50 +0800 | |
---|---|---|
committer | 2016-03-03 14:42:49 -0700 | |
commit | 7bcd79ac50d9d83350a835bdb91c04ac9e098412 (patch) | |
tree | b8161854b8ec9825e7b9fabf2299231130eaf574 /include/linux/blkdev.h | |
parent | Merge tag 'pci-v4.5-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci (diff) | |
download | wireguard-linux-7bcd79ac50d9d83350a835bdb91c04ac9e098412.tar.xz wireguard-linux-7bcd79ac50d9d83350a835bdb91c04ac9e098412.zip |
block: bio: introduce helpers to get the 1st and last bvec
The bio passed to bio_will_gap() may be fast cloned from upper
layer(dm, md, bcache, fs, ...), or from bio splitting in block
core.
Unfortunately bio_will_gap() just figures out the last bvec via
'bi_io_vec[prev->bi_vcnt - 1]' directly, and this way is obviously
wrong.
This patch introduces two helpers for getting the first and last
bvec of one bio for fixing the issue.
Cc: stable@vger.kernel.org
Reported-by: Sagi Grimberg <sagig@dev.mellanox.co.il>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions