From 91849e001b70e58e5121f0c0476b4f70b52b8221 Mon Sep 17 00:00:00 2001 From: Aditya Garg <85610623+AdityaGarg8@users.noreply.github.com> Date: Sun, 25 Aug 2024 16:36:47 +0530 Subject: [PATCH] Fix APFS driver --- 8001-Add-APFS-driver.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/8001-Add-APFS-driver.patch b/8001-Add-APFS-driver.patch index ef7e14c..ef9d6ff 100644 --- a/8001-Add-APFS-driver.patch +++ b/8001-Add-APFS-driver.patch @@ -6098,7 +6098,7 @@ index 000000000..c8ae4092a +#include +#include "apfs.h" + -+#define MAX(X, Y) ((X) <= (Y) ? (Y) : (X)) ++#define APFS_MAX(X, Y) ((X) <= (Y) ? (Y) : (X)) + +/** + * apfs_ext_is_hole - Does this extent represent a hole in a sparse file? @@ -8063,7 +8063,7 @@ index 000000000..c8ae4092a + prev_end = prev_ext.bno + prev_ext.blkcount; + if (prev_end < *paddr_end) { + /* The extent to put is part of a snapshot */ -+ tmp.phys_block_num = MAX(prev_end, paddr_min); ++ tmp.phys_block_num = APFS_MAX(prev_end, paddr_min); + tmp.len = (*paddr_end - tmp.phys_block_num) << sb->s_blocksize_bits; + ret = apfs_create_update_pext(query, &tmp, -1); + *paddr_end = tmp.phys_block_num; @@ -8203,7 +8203,7 @@ index 000000000..c8ae4092a + prev_end = prev_ext.bno + prev_ext.blkcount; + if (prev_end < *paddr_end) { + /* The extent to take is part of a snapshot */ -+ tmp.phys_block_num = MAX(prev_end, paddr_min); ++ tmp.phys_block_num = APFS_MAX(prev_end, paddr_min); + tmp.len = (*paddr_end - tmp.phys_block_num) << sb->s_blocksize_bits; + ret = apfs_create_update_pext(query, &tmp, +1); + *paddr_end = tmp.phys_block_num;