mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
Linux-5.18 replace set_page_dirty with dirty_folio
The commits going into Linux 5.18: fs: Add aops->dirty_folio (6f31a5a261db) fs: Convert __set_page_dirty_buffers to block_dirty_folio (e621900ad2) fs: Remove aops ->set_page_dirty (3a3bae50af) replaces the address_space_operations structure member set_page_dirty which with dirty_folio. The linux function __set_page_dirty_buffers is replaced by block_dirty_folio. Nothing within afs uses or implements the set_page_dirty function, however the structure member is required to be initialized. Add an autoconf test for the dirty_folio member and if present, set the address_space_operations member dirty_folio to block_dirty_folio instead of setting the set_page_dirty member. Change-Id: Iad6783308989f4a1390c1c94d2c571048bd4e771 Reviewed-on: https://gerrit.openafs.org/14939 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
This commit is contained in:
parent
bffc354ff7
commit
6aa129e743
@ -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,
|
||||
|
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user