diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index 15258ee684..c0cc250343 100644 --- a/src/afs/LINUX/osi_vnodeops.c +++ b/src/afs/LINUX/osi_vnodeops.c @@ -3293,7 +3293,11 @@ static struct address_space_operations afs_file_aops = { .readpage = afs_linux_readpage, .readpages = afs_linux_readpages, .writepage = afs_linux_writepage, +#if defined(STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_DIRTY_FOLIO) + .dirty_folio = block_dirty_folio, +#else .set_page_dirty = __set_page_dirty_buffers, +#endif #if defined (STRUCT_ADDRESS_SPACE_OPERATIONS_HAS_WRITE_BEGIN) .write_begin = afs_linux_write_begin, .write_end = afs_linux_write_end, diff --git a/src/cf/linux-kernel-struct.m4 b/src/cf/linux-kernel-struct.m4 index 003d34ab89..2d8cee655a 100644 --- a/src/cf/linux-kernel-struct.m4 +++ b/src/cf/linux-kernel-struct.m4 @@ -3,6 +3,8 @@ dnl Check for structure elements AC_CHECK_LINUX_STRUCT([address_space], [backing_dev_info], [fs.h]) AC_CHECK_LINUX_STRUCT([address_space_operations], [write_begin], [fs.h]) +dnl linux 5.18 replaced set_page_dirty with dirty_folio +AC_CHECK_LINUX_STRUCT([address_space_operations], [dirty_folio], [fs.h]) AC_CHECK_LINUX_STRUCT([backing_dev_info], [name], [backing-dev.h]) AC_CHECK_LINUX_STRUCT([cred], [session_keyring], [cred.h])