scst_lib: Port to Linux kernel v7.0

Support for the following block layer changes in the Linux kernel v7.0:

  - 5e2fde1a9433 ("block: pass io_comp_batch to rq_end_io_fn callback")
This commit is contained in:
Gleb Chesnokov
2026-04-08 13:12:51 +03:00
parent 3e16f63043
commit 9481c7e3a6

View File

@@ -8846,11 +8846,6 @@ out:
return res;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
static void scsi_end_async(struct request *req, int error)
#else
/*
* See also commit de671d6116b5 ("block: change request end_io handler to pass
* back a return value") # v6.1.
@@ -8863,7 +8858,17 @@ static void scsi_end_async(struct request *req, int error)
#define RQ_END_IO_RET enum rq_end_io_ret
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && \
!defined(CONFIG_SUSE_KERNEL)
static RQ_END_IO_RET scsi_end_async(struct request *req, int error)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(7, 0, 0)
static RQ_END_IO_RET scsi_end_async(struct request *req, blk_status_t error)
#else
/*
* See also commit 5e2fde1a9433 ("block: pass io_comp_batch to rq_end_io_fn callback") # v7.0.
*/
static RQ_END_IO_RET scsi_end_async(struct request *req, blk_status_t error,
const struct io_comp_batch *iob)
#endif
{
struct scsi_io_context *sioc = req->end_io_data;