linux-apfs / linux-apfs-rw

APFS module for linux, with experimental write support
GNU General Public License v2.0
545 stars 36 forks source link

Doesn't compile on 6.12 #82

Closed AdityaGarg8 closed 3 weeks ago

AdityaGarg8 commented 3 weeks ago

The following error is shown:

  CC [M]  fs/apfs/inode.o
fs/apfs/inode.c: In function ‘__apfs_write_begin’:
fs/apfs/inode.c:568:35: error: passing argument 1 of ‘__block_write_begin’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  568 |         err = __block_write_begin(page, pos, len, apfs_get_new_block);
      |                                   ^~~~
      |                                   |
      |                                   struct page *
In file included from fs/apfs/inode.c:7:
./include/linux/buffer_head.h:261:39: note: expected ‘struct folio *’ but argument is of type ‘struct page *’
  261 | int __block_write_begin(struct folio *folio, loff_t pos, unsigned len,
      |                         ~~~~~~~~~~~~~~^~~~~
fs/apfs/inode.c: In function ‘__apfs_write_end’:
fs/apfs/inode.c:631:66: error: passing argument 6 of ‘generic_write_end’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  631 |         ret = generic_write_end(file, mapping, pos, len, copied, page, fsdata);
      |                                                                  ^~~~
      |                                                                  |
      |                                                                  struct page *
In file included from fs/apfs/inode.c:7:
./include/linux/buffer_head.h:268:33: note: expected ‘struct folio *’ but argument is of type ‘struct page *’
  268 |                                 struct folio *, void *);
      |                                 ^~~~~~~~~~~~~~
fs/apfs/inode.c: At top level:
fs/apfs/inode.c:701:27: error: initialization of ‘int (*)(struct file *, struct address_space *, loff_t,  unsigned int,  struct folio **, void **)’ {aka ‘int (*)(struct file *, struct address_space *, long long int,  unsigned int,  struct folio **, void **)’} from incompatible pointer type ‘int (*)(struct file *, struct address_space *, loff_t,  unsigned int,  struct page **, void **)’ {aka ‘int (*)(struct file *, struct address_space *, long long int,  unsigned int,  struct page **, void **)’} [-Werror=incompatible-pointer-types]
  701 |         .write_begin    = apfs_write_begin,
      |                           ^~~~~~~~~~~~~~~~
fs/apfs/inode.c:701:27: note: (near initialization for ‘apfs_aops.write_begin’)
fs/apfs/inode.c:702:27: error: initialization of ‘int (*)(struct file *, struct address_space *, loff_t,  unsigned int,  unsigned int,  struct folio *, void *)’ {aka ‘int (*)(struct file *, struct address_space *, long long int,  unsigned int,  unsigned int,  struct folio *, void *)’} from incompatible pointer type ‘int (*)(struct file *, struct address_space *, loff_t,  unsigned int,  unsigned int,  struct page *, void *)’ {aka ‘int (*)(struct file *, struct address_space *, long long int,  unsigned int,  unsigned int,  struct page *, void *)’} [-Werror=incompatible-pointer-types]
  702 |         .write_end      = apfs_write_end,
      |                           ^~~~~~~~~~~~~~
fs/apfs/inode.c:702:27: note: (near initialization for ‘apfs_aops.write_end’)
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:229: fs/apfs/inode.o] Error 1
make[3]: *** [scripts/Makefile.build:478: fs/apfs] Error 2
make[2]: *** [scripts/Makefile.build:478: fs] Error 2
make[1]: *** [/home/runner/work/linux-t2-patches/linux-t2-patches/linux-6.12-rc5/Makefile:1936: .] Error 2
make: *** [Makefile:224: __sub-make] Error 2
Error: Process completed with exit code 2.
eafer commented 3 weeks ago

I just made a release that should fix this.

AdityaGarg8 commented 3 weeks ago

Works, thanks!