Commit 6f22b664 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Al Viro

fs: use timespec64 in relatime_need_update

For some reason, the conversion of the VFS code away from 'struct timespec'
left one function behind that still uses it, for absolutely no reason.

Using timespec64 will make the atime update logic work correctly past
y2038.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 6d46d293
...@@ -1601,7 +1601,7 @@ EXPORT_SYMBOL(bmap); ...@@ -1601,7 +1601,7 @@ EXPORT_SYMBOL(bmap);
* passed since the last atime update. * passed since the last atime update.
*/ */
static int relatime_need_update(struct vfsmount *mnt, struct inode *inode, static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
struct timespec now) struct timespec64 now)
{ {
if (!(mnt->mnt_flags & MNT_RELATIME)) if (!(mnt->mnt_flags & MNT_RELATIME))
...@@ -1702,7 +1702,7 @@ bool atime_needs_update(const struct path *path, struct inode *inode) ...@@ -1702,7 +1702,7 @@ bool atime_needs_update(const struct path *path, struct inode *inode)
now = current_time(inode); now = current_time(inode);
if (!relatime_need_update(mnt, inode, timespec64_to_timespec(now))) if (!relatime_need_update(mnt, inode, now))
return false; return false;
if (timespec64_equal(&inode->i_atime, &now)) if (timespec64_equal(&inode->i_atime, &now))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment