From 52b5e841cf97c4c39919b74394695bde0a11fe08 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Fri, 3 May 2024 10:03:50 +0300 Subject: [PATCH] scst/include/backport.h: Fix backport for new stable kernels This patch fixes the build against kernel versions >= 6.6.23. --- scst/include/backport.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index 1e85c95c4..5de409079 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -282,9 +282,11 @@ static inline void blkdev_put_backport(struct block_device *bdev, void *holder) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0) && \ + (LINUX_VERSION_CODE >> 8 != KERNEL_VERSION(6, 6, 0) >> 8 || \ + LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 23)) /* - * See also commit e719b4d15674 ("block: Provide bdev_open_* functions") # v6.7. + * See also commit e719b4d15674 ("block: Provide bdev_open_* functions") # v6.7, v6.6.23. */ struct bdev_handle { struct block_device *bdev;