Merge pull request #57 from arutk/fix_blk_rq_append

configure.d: fix detecting and usage of cas_blk_rq_append_bio
This commit is contained in:
Michal Rakowski 2019-07-02 16:20:59 +02:00 committed by GitHub
commit 3fd6dfc13b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -6,11 +6,11 @@
. `dirname $0`/conf_framework . `dirname $0`/conf_framework
if compile_module "struct bio b;blk_rq_append_bio(NULL, &b)" "linux/blkdev.h" if compile_module "struct bio *b;blk_rq_append_bio(NULL, &b)" "linux/blkdev.h"
then then
add_define "cas_blk_rq_append_bio(rq, bounce_bio) \\ add_define "cas_blk_rq_append_bio(rq, bounce_bio) \\
blk_rq_append_bio(rq, bounce_bio)" blk_rq_append_bio(rq, &bounce_bio)"
else else
add_define "cas_blk_rq_append_bio(rq, bounce_bio) \\ add_define "cas_blk_rq_append_bio(rq, bounce_bio) \\
blk_rq_append_bio(rq, &bounce_bio)" blk_rq_append_bio(rq, bounce_bio)"
fi fi

View File

@ -28,7 +28,7 @@ static inline struct request *cas_blk_make_request(struct request_queue *q,
struct bio *bounce_bio = bio; struct bio *bounce_bio = bio;
int ret; int ret;
cas_blk_queue_bounce(q, &bounce_bio); cas_blk_queue_bounce(q, &bounce_bio);
ret = cas_blk_rq_append_bio(rq, &bounce_bio); ret = cas_blk_rq_append_bio(rq, bounce_bio);
if (unlikely(ret)) { if (unlikely(ret)) {
blk_put_request(rq); blk_put_request(rq);
return ERR_PTR(ret); return ERR_PTR(ret);