Closed terraluna977 closed 3 weeks ago
Unfortunately I have not tested as I do not have an Apple computer with APFS - only HFS+. The patch I have made allowed me to simply compile on a 6.12 kernel. I do build the apfs.ko as a part of the kernel tree, so I kind of rush to have it building simply updating the API calls. I guess I could format APFS on a Macbook an external USB and then try read/write in a Linux PC... If your diagnose of __apfs_write_begin() is correct, it should end with a kernel crash.
I can confirm that it crashes. I need to get the next release out soon because it includes a serious bugfix, so I'll just fix the build myself today if I can. Thanks anyway.
Thanks for the patch, but have you tested this already? From looking at the code, it seems that
__apfs_write_begin()
is ignoring the page we grab and instead setting the folio from the return argument, which would be null or undefined.