mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
linux 6.7 compat: use inode atime/mtime accessors
6.6 made i_ctime inaccessible; 6.7 has done the same for i_atime and i_mtime. This extends the method used for ctime inb37f29341to atime and mtime as well. Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://github.com/sponsors/robn (cherry picked from commit3c13601a12)
This commit is contained in:
@@ -217,5 +217,25 @@ zpl_dir_emit_dots(struct file *file, zpl_dir_context_t *ctx)
|
||||
#else
|
||||
#define zpl_inode_set_ctime_to_ts(ip, ts) (ip->i_ctime = ts)
|
||||
#endif
|
||||
#ifdef HAVE_INODE_GET_ATIME
|
||||
#define zpl_inode_get_atime(ip) inode_get_atime(ip)
|
||||
#else
|
||||
#define zpl_inode_get_atime(ip) (ip->i_atime)
|
||||
#endif
|
||||
#ifdef HAVE_INODE_SET_ATIME_TO_TS
|
||||
#define zpl_inode_set_atime_to_ts(ip, ts) inode_set_atime_to_ts(ip, ts)
|
||||
#else
|
||||
#define zpl_inode_set_atime_to_ts(ip, ts) (ip->i_atime = ts)
|
||||
#endif
|
||||
#ifdef HAVE_INODE_GET_MTIME
|
||||
#define zpl_inode_get_mtime(ip) inode_get_mtime(ip)
|
||||
#else
|
||||
#define zpl_inode_get_mtime(ip) (ip->i_mtime)
|
||||
#endif
|
||||
#ifdef HAVE_INODE_SET_MTIME_TO_TS
|
||||
#define zpl_inode_set_mtime_to_ts(ip, ts) inode_set_mtime_to_ts(ip, ts)
|
||||
#else
|
||||
#define zpl_inode_set_mtime_to_ts(ip, ts) (ip->i_mtime = ts)
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_ZPL_H */
|
||||
|
||||
Reference in New Issue
Block a user