configure.d: fix detecting and usage of cas_blk_rq_append_bio
1. When generating cas_blk_rq_append_bio, check whether a version with double pointer compiles successfully. This is a better criteria than the version with single pointer since the latter may compile successfully regardless of kernel blk_rq_append_bio prototype. 2. Always provide single pointer to cas_blk_rq_append_bio macro - its up to cas_blk_rq_append_bio implementation to decide whether extra level of indirection is needed. This fixes compilation with kernel 4.14.98. Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
3c94734d4e
commit
ef223cfd47
@ -6,11 +6,11 @@
|
||||
|
||||
. `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
|
||||
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
|
||||
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
|
||||
|
@ -28,7 +28,7 @@ static inline struct request *cas_blk_make_request(struct request_queue *q,
|
||||
struct bio *bounce_bio = bio;
|
||||
int ret;
|
||||
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)) {
|
||||
blk_put_request(rq);
|
||||
return ERR_PTR(ret);
|
||||
|
Loading…
Reference in New Issue
Block a user