diff --git a/scst/include/backport.h b/scst/include/backport.h index 7e2e31b84..3bc2b7e7a 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -54,10 +54,6 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q) } #endif -#ifndef RQF_COPY_USER -#define RQF_COPY_USER REQ_COPY_USER -#endif - /* */ #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 6d4ff4353..149c239d0 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8107,7 +8107,15 @@ static struct request *__blk_map_kern_sg(struct request_queue *q, if (bw != NULL) { atomic_set(&bw->bios_inflight, bios); - rq->cmd_flags |= RQF_COPY_USER; +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) + /* + * See also patch "block: split out request-only flags into a + * new namespace" (commit e806402130c9). + */ + rq->cmd_flags |= REQ_COPY_USER; +#else + rq->rq_flags |= RQF_COPY_USER; +#endif } out: