]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
block: ensure to split after potentially bouncing a bio
authorJunichi Nomura <j-nomura@ce.jp.nec.com>
Tue, 22 Dec 2015 17:23:44 +0000 (10:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Feb 2016 22:28:23 +0000 (14:28 -0800)
commitecf177df3b63d88f6fb5e10683004f50b6dfe116
tree269c8859f8511adcbf33c6633f6a5e68e5380d6f
parentc854fc16ba94297c971fc93aebdfded3f543259e
block: ensure to split after potentially bouncing a bio

commit 23688bf4f830a89866fd0ed3501e342a7360fe4f upstream.

blk_queue_bio() does split then bounce, which makes the segment
counting based on pages before bouncing and could go wrong. Move
the split to after bouncing, like we do for blk-mq, and the we
fix the issue of having the bio count for segments be wrong.

Fixes: 54efd50bfd87 ("block: make generic_make_request handle arbitrarily sized bios")
Tested-by: Artem S. Tashkinov <t.artem@lycos.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/blk-core.c