diff --git a/kmod/src/Makefile.kernelcompat b/kmod/src/Makefile.kernelcompat index 9016eef3..7aa99c0f 100644 --- a/kmod/src/Makefile.kernelcompat +++ b/kmod/src/Makefile.kernelcompat @@ -306,6 +306,17 @@ ifneq (,$(shell grep 'int buffer_migrate_folio.struct address_space' include/lin ccflags-y += -DKC_HAVE_BUFFER_MIGRATE_FOLIO endif +# +# v6.7-rc4-307-g17bf23a981be +# +# block_write_full_page() is replaced with block_write_full_folio(), +# but that isn't exported as it used to be (and the only users now +# are builtin). However, the kernel will fall back to using the +# .writepages method instead, so we can drop this method. +ifneq (,$(shell grep 'int block_write_full_page.struct page' include/linux/buffer_head.h)) +ccflags-y += -DKC_HAVE_BLOCK_WRITE_FULL_PAGE +endif + # # v6.15-13744-g41cb08555c41 # diff --git a/kmod/src/data.c b/kmod/src/data.c index af7f89e5..16f66dc6 100644 --- a/kmod/src/data.c +++ b/kmod/src/data.c @@ -811,10 +811,12 @@ static void scoutfs_readahead(struct readahead_control *rac) } } +#ifdef KC_HAVE_BLOCK_WRITE_FULL_PAGE static int scoutfs_writepage(struct page *page, struct writeback_control *wbc) { return block_write_full_page(page, scoutfs_get_block_write, wbc); } +#endif static int scoutfs_writepages(struct address_space *mapping, struct writeback_control *wbc) @@ -2253,7 +2255,9 @@ const struct address_space_operations scoutfs_file_aops = { .readpage = scoutfs_readpage, #endif .readahead = scoutfs_readahead, +#ifdef KC_HAVE_BLOCK_WRITE_FULL_PAGE .writepage = scoutfs_writepage, +#endif .writepages = scoutfs_writepages, .write_begin = scoutfs_write_begin, .write_end = scoutfs_write_end,