]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
fs: use timespec64 in relatime_need_update
authorArnd Bergmann <arnd@arndb.de>
Fri, 26 Apr 2019 14:50:41 +0000 (16:50 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 26 Apr 2019 15:18:38 +0000 (11:18 -0400)
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: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/inode.c

index e9d97add2b36c9731a8d877e2fd32c7c2e1a382d..f8ed7144c3dde00cf6bbe4e2939fda09eea74237 100644 (file)
@@ -1601,7 +1601,7 @@ EXPORT_SYMBOL(bmap);
  * passed since the last atime update.
  */
 static int relatime_need_update(struct vfsmount *mnt, struct inode *inode,
-                            struct timespec now)
+                            struct timespec64 now)
 {
 
        if (!(mnt->mnt_flags & MNT_RELATIME))
@@ -1702,7 +1702,7 @@ bool atime_needs_update(const struct path *path, struct inode *inode)
 
        now = current_time(inode);
 
-       if (!relatime_need_update(mnt, inode, timespec64_to_timespec(now)))
+       if (!relatime_need_update(mnt, inode, now))
                return false;
 
        if (timespec64_equal(&inode->i_atime, &now))