mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 20:51:27 +00:00
scst: Backport scst_blk_rq_cpu() to kernel versions before v2.6.28 (merge r7877 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7889 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user