mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Linux 5.6 compat: timestamp_truncate()
The timestamp_truncate() function was added, it replaces the existing timespec64_trunc() function. This change renames our wrapper function to be consistent with the upstream name and updates the compatibility code for older kernels accordingly. Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #9956 Closes #9961
This commit is contained in:
committed by
Tony Hutter
parent
ba2cf53545
commit
06b473a8ae
+7
-6
@@ -188,13 +188,14 @@ zpl_dir_emit_dots(struct file *file, zpl_dir_context_t *ctx)
|
||||
}
|
||||
#endif /* HAVE_VFS_ITERATE */
|
||||
|
||||
/*
|
||||
* Linux 4.18, inode times converted from timespec to timespec64.
|
||||
*/
|
||||
#if defined(HAVE_INODE_TIMESPEC64_TIMES)
|
||||
#define zpl_inode_timespec_trunc(ts, gran) timespec64_trunc(ts, gran)
|
||||
#if defined(HAVE_INODE_TIMESTAMP_TRUNCATE)
|
||||
#define zpl_inode_timestamp_truncate(ts, ip) timestamp_truncate(ts, ip)
|
||||
#elif defined(HAVE_INODE_TIMESPEC64_TIMES)
|
||||
#define zpl_inode_timestamp_truncate(ts, ip) \
|
||||
timespec64_trunc(ts, (ip)->i_sb->s_time_gran)
|
||||
#else
|
||||
#define zpl_inode_timespec_trunc(ts, gran) timespec_trunc(ts, gran)
|
||||
#define zpl_inode_timestamp_truncate(ts, ip) \
|
||||
timespec_trunc(ts, (ip)->i_sb->s_time_gran)
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_ZPL_H */
|
||||
|
||||
Reference in New Issue
Block a user