From 50539452265b304fe0a46d0ad0334b6c0182c24a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 6 Jan 2018 22:53:50 +0000 Subject: [PATCH 1/2] scst_lib: Kernel v4.14.x (x>=11) build fix git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7329 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 0a2c5842f..b6b5f4a01 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -7979,7 +7979,12 @@ static struct request *blk_make_request(struct request_queue *q, blk_put_request(rq); return ERR_PTR(ret); } -#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0) + /* + * See also commit commit 0abc2a10389f ("block: fix + * blk_rq_append_bio"). That commit has been backported to + * kernel v4.14.11 as 88da02868f77. + */ +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 11) ret = blk_rq_append_bio(rq, bio); if (unlikely(ret)) { blk_put_request(rq); From 9de081f1a7611982f7495a57583e5b850353190a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 6 Jan 2018 22:54:12 +0000 Subject: [PATCH 2/2] scripts/kernel-functions: Synchronize with the latest kernel.org directory layout git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7330 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/kernel-functions | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/scripts/kernel-functions b/scripts/kernel-functions index af499d0a0..d9ad40f4d 100644 --- a/scripts/kernel-functions +++ b/scripts/kernel-functions @@ -64,10 +64,22 @@ function download_kernel { } function extract_kernel_archive { + local kver="$(kernel_version $1)" + local plevel="$(patchlevel $1)" + local series="$1" + if [ -e "${kernel_sources}/linux-$1.tar.xz" ]; then xz -cd "${kernel_sources}/linux-$1.tar.xz" | tar xf - - else + elif [ -e "${kernel_sources}/linux-$kver.tar.xz" ]; then + xz -cd "${kernel_sources}/linux-$kver.tar.xz" | tar xf - && + mv linux-$kver linux-$1 + elif [ -e "${kernel_sources}/linux-$1.tar.bz2" ]; then tar xjf "${kernel_sources}/linux-$1.tar.bz2" + elif [ -e "${kernel_sources}/linux-$kver.tar.bz2" ]; then + tar xjf "${kernel_sources}/linux-$kver.tar.bz2" && + mv linux-$kver linux-$1 + else + return 1 fi } @@ -213,6 +225,13 @@ index 3f2793d..96e45ea 100644 EOF fi fi + # After patch-v4.14.1[12] has been applied, the execute bit has to be + # set for sync-check.sh since patch can't do that. + for f in "tools/objtool/sync-check.sh"; do + if [ -e "$f" ]; then + chmod a+x "$f" + fi + done ) rmdir "${tmpdir}" }