You've already forked linux-apfs-rw
mirror of
https://github.com/linux-apfs/linux-apfs-rw.git
synced 2026-05-01 15:01:34 -07:00
Fix build for RHEL 9 kernels
RHEL 9 is using the 5.14 kernel, but they have picked up a patch from 5.15 that broke the api for us: https://github.com/linux-apfs/linux-apfs-rw/issues/26 They don't seem to provide a macro to check the exact kernel version in use, so treat all 5.14 RHEL kernels as 5.15. This will of course break the build for RHEL users who haven't updated their kernels, but I don't know of a better way to handle the problem. Signed-off-by: Ernesto A. Fernández <ernesto@corellium.com>
This commit is contained in:
@@ -1080,10 +1080,10 @@ static int apfs_setup_bdi(struct super_block *sb)
|
||||
struct backing_dev_info *bdi_dev = NULL, *bdi_sb = NULL;
|
||||
int err;
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)
|
||||
bdi_dev = nxi->nx_bdev->bd_bdi;
|
||||
#else
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) || (defined(RHEL_RELEASE) && LINUX_VERSION_CODE == KERNEL_VERSION(5, 14, 0))
|
||||
bdi_dev = nxi->nx_bdev->bd_disk->bdi;
|
||||
#else
|
||||
bdi_dev = nxi->nx_bdev->bd_bdi;
|
||||
#endif
|
||||
|
||||
err = super_setup_bdi(sb);
|
||||
|
||||
Reference in New Issue
Block a user