From d91dd9b3ed1fdc323c7a5b26cb56a1f1e850a943 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 8 Mar 2017 04:36:45 +0000 Subject: [PATCH 1/2] 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: From 76daca5677f42e226d6460f4e908802e87bea8ae Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 8 Mar 2017 04:43:23 +0000 Subject: [PATCH 2/2] scst_lib.c: Fix indentation git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7105 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 53347a782..1c9c838bb 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8001,10 +8001,10 @@ 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). - */ + /* + * 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;