scst: Port to Linux kernel v5.17

This commit is contained in:
Gleb Chesnokov
2022-01-24 16:05:44 +03:00
parent 1e40ce12bd
commit b4fcdb7349
2 changed files with 16 additions and 7 deletions

View File

@@ -202,15 +202,24 @@ blkdev_get_by_path(const char *path, fmode_t mode, void *holder)
}
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
/*
* See also commit 8eeed0b554b9 ("block: remove unnecessary argument from
* blk_execute_rq_nowait") # v5.12.
* See also commit b84ba30b6c7a ("block: remove the gendisk argument to
* blk_execute_rq") # v5.17.
*/
static inline void blk_execute_rq_nowait_backport(struct gendisk *bd_disk,
struct request *rq, int at_head, rq_end_io_fn *done)
static inline
void blk_execute_rq_nowait_backport(struct request *rq, bool at_head,
rq_end_io_fn *done)
{
blk_execute_rq_nowait(rq->q, bd_disk, rq, at_head, done);
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0)
/*
* See also commit 8eeed0b554b9 ("block: remove unnecessary argument from
* blk_execute_rq_nowait") # v5.12.
*/
blk_execute_rq_nowait(rq->q, NULL, rq, at_head, done);
#else
blk_execute_rq_nowait(NULL, rq, at_head, done);
#endif
}
#define blk_execute_rq_nowait blk_execute_rq_nowait_backport

View File

@@ -8844,7 +8844,7 @@ int scst_scsi_exec_async(struct scst_cmd *cmd, void *data,
rq->cmd_flags |= REQ_FAILFAST_MASK;
#endif
blk_execute_rq_nowait(NULL, rq,
blk_execute_rq_nowait(rq,
(cmd->queue_type == SCST_CMD_QUEUE_HEAD_OF_QUEUE), scsi_end_async);
out:
return res;