From d91dd9b3ed1fdc323c7a5b26cb56a1f1e850a943 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 8 Mar 2017 04:36:45 +0000 Subject: [PATCH] Linux kernel v4.10 build fix. Signed-off-by: Sebastian Herbszt git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7104 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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: