From: Gleb C. <lna...@ya...> - 2025-03-25 13:54:43
|
Commit: 1f40850 GitHub URL: https://github.com/SCST-project/scst/commit/1f40850809b5703371bff215b177fab6583f4928 Author: Gleb Chesnokov Date: 2025-03-25T16:53:57+03:00 Log Message: ----------- scst_lib: Port to Linux kernel v6.14 Support for the following block layer changes in the Linux kernel v6.14: - 6aeb4f836480 ("block: remove bio_add_pc_page") Modified Paths: -------------- scst/src/scst_lib.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) =================================================================== diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 6fc4649..75ead70 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8554,16 +8554,20 @@ static struct request *__blk_map_kern_sg(struct request_queue *q, TRACE_DBG("len %zd, bytes %zd, offset %zd", len, bytes, offset); +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) rc = bio_add_pc_page(q, bio, page, bytes, offset); +#else + rc = bio_add_page(bio, page, bytes, offset); +#endif if (rc < bytes) { if (unlikely(need_new_bio || rc < 0)) { rq = ERR_PTR(rc < 0 ? rc : -EIO); goto out_free_bios; - } else { - need_new_bio = true; - len -= rc; - offset += rc; } + + need_new_bio = true; + offset += rc; + len -= rc; } else { need_new_bio = false; offset = 0; |