From 0f0131a73de07ce9ff8fb7179c69257bd1899a33 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 13 Jan 2019 21:10:13 +0000 Subject: [PATCH] scst: Backport scst_blk_rq_cpu() to kernel versions before v2.6.28 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7877 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index b11525117..4ed3cc485 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -123,7 +123,13 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q) static inline unsigned int scst_blk_rq_cpu(struct request *rq) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28) + /* + * See also commit c7c22e4d5c1f ("block: add support for IO CPU + * affinity") # v2.6.28. + */ + return 0; +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0) return rq->cpu; #else return blk_mq_rq_cpu(rq);