mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
block: fix blk_rq_append_bio
Commit caa4b02476e3(blk-map: call blk_queue_bounce from blk_rq_append_bio)
moves blk_queue_bounce() into blk_rq_append_bio(), but don't consider
the fact that the bounced bio becomes invisible to caller since the
parameter type is 'struct bio *'. Make it a pointer to a pointer to
a bio, so the caller sees the right bio also after a bounce.
Fixes: caa4b02476 ("blk-map: call blk_queue_bounce from blk_rq_append_bio")
Cc: Christoph Hellwig <[email protected]>
Reported-by: Michele Ballabio <[email protected]>
(handling failure of blk_rq_append_bio(), only call bio_get() after
blk_rq_append_bio() returns OK)
Tested-by: Michele Ballabio <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
14cb0dc647
commit
0abc2a1038
4 changed files with 28 additions and 20 deletions
|
|
@ -920,7 +920,7 @@ pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
|
|||
" %d i: %d bio: %p, allocating another"
|
||||
" bio\n", bio->bi_vcnt, i, bio);
|
||||
|
||||
rc = blk_rq_append_bio(req, bio);
|
||||
rc = blk_rq_append_bio(req, &bio);
|
||||
if (rc) {
|
||||
pr_err("pSCSI: failed to append bio\n");
|
||||
goto fail;
|
||||
|
|
@ -938,7 +938,7 @@ pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
|
|||
}
|
||||
|
||||
if (bio) {
|
||||
rc = blk_rq_append_bio(req, bio);
|
||||
rc = blk_rq_append_bio(req, &bio);
|
||||
if (rc) {
|
||||
pr_err("pSCSI: failed to append bio\n");
|
||||
goto fail;
|
||||
|
|
|
|||
Loading…
Reference in a new issue