Linux 6.19: replace i_state access with inode_state_read_once()

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #18053
This commit is contained in:
Rob Norris
2025-12-01 16:05:27 +11:00
committed by Tony Hutter
parent 18065e9296
commit 135fffbc3e
4 changed files with 35 additions and 1 deletions
@@ -269,4 +269,12 @@ zpl_is_32bit_api(void)
#define generic_drop_inode(ip) inode_generic_drop(ip)
#endif
#ifndef HAVE_INODE_STATE_READ_ONCE
/*
* 6.19 API change. We should no longer access i_state directly. If the new
* helper function doesn't exist, define our own.
*/
#define inode_state_read_once(ip) READ_ONCE(ip->i_state)
#endif
#endif /* _ZFS_VFS_H */