diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 307779020..53347a782 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8000,7 +8000,15 @@ static struct request *__blk_map_kern_sg(struct request_queue *q, if (bw != NULL) { atomic_set(&bw->bios_inflight, bios); +#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: