mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 4.16 compat: inode_set_iversion()
A new interface was added to manipulate the version field of an inode. Add a inode_set_iversion() wrapper for older kernels and use the new interface when available. The i_version field was dropped from the trace point due to the switch to an atomic64_t i_version type. Reviewed-by: Olaf Faaland <faaland1@llnl.gov> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Reviewed-by: Chunwei Chen <david.chen@nutanix.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #7148
This commit is contained in:
@@ -578,4 +578,18 @@ current_time(struct inode *ip)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 4.16 API change
|
||||
* Added iversion interface for managing inode version field.
|
||||
*/
|
||||
#ifdef HAVE_INODE_SET_IVERSION
|
||||
#include <linux/iversion.h>
|
||||
#else
|
||||
static inline void
|
||||
inode_set_iversion(struct inode *ip, u64 val)
|
||||
{
|
||||
ip->i_version = val;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ZFS_VFS_H */
|
||||
|
||||
Reference in New Issue
Block a user