mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +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 in b37f29341 to atime
and mtime as well.
Signed-off-by: Rob Norris <robn@despairlabs.com>
Sponsored-by: https://github.com/sponsors/robn
This commit is contained in:
committed by
Brian Behlendorf
parent
b3626f0a35
commit
3c13601a12
@@ -273,5 +273,25 @@ extern long zpl_ioctl_fideduperange(struct file *filp, void *arg);
|
||||
#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