Skip to content

Commit ca72e6d

Browse files
mira-miracolisrett
andauthored
[KERNEL] Fix build on RHEL 9.7 & 10.1
Co-authored-by: Simon Rettberg <srett@users.noreply.github.com>
1 parent 7832035 commit ca72e6d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/kernel/blk.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ static int dnbd3_close_device(dnbd3_device_t *dev)
4141

4242
/* new requests might have been queued up, */
4343
/* but now that imgname is NULL no new ones can show up */
44-
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0)
44+
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) \
45+
&& !RHEL_CHECK_VERSION(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 7) && RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION(10, 0))
4546
blk_mq_freeze_queue(dev->queue);
4647
set_capacity(dev->disk, 0);
4748
blk_mq_unfreeze_queue(dev->queue);
@@ -431,7 +432,8 @@ int dnbd3_blk_add_device(dnbd3_device_t *dev, int minor)
431432
dev->tag_set.queue_depth = 128;
432433
dev->tag_set.numa_node = NUMA_NO_NODE;
433434
dev->tag_set.cmd_size = sizeof(struct dnbd3_cmd);
434-
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0)
435+
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) \
436+
&& !RHEL_CHECK_VERSION(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 7) && RHEL_RELEASE_CODE != RHEL_RELEASE_VERSION(10, 0))
435437
dev->tag_set.flags = BLK_MQ_F_SHOULD_MERGE;
436438
#endif
437439
dev->tag_set.driver_data = dev;

0 commit comments

Comments
 (0)