linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fs: use timespec64 in relatime_need_update
@ 2019-04-26 14:50 Arnd Bergmann
  2019-04-26 15:17 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-04-26 14:50 UTC (permalink / raw)
  To: Alexander Viro
  Cc: y2038, Arnd Bergmann, Andrew Morton, Miklos Szeredi, Jeff Layton,
	Darrick J. Wong, linux-fsdevel, linux-kernel

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>
---
 fs/inode.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/inode.c b/fs/inode.c
index e9d97add2b36..f8ed7144c3dd 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -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))
-- 
2.20.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fs: use timespec64 in relatime_need_update
  2019-04-26 14:50 [PATCH] fs: use timespec64 in relatime_need_update Arnd Bergmann
@ 2019-04-26 15:17 ` Al Viro
  0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2019-04-26 15:17 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: y2038, Andrew Morton, Miklos Szeredi, Jeff Layton,
	Darrick J. Wong, linux-fsdevel, linux-kernel

On Fri, Apr 26, 2019 at 04:50:41PM +0200, Arnd Bergmann wrote:
> 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.

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-26 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-26 14:50 [PATCH] fs: use timespec64 in relatime_need_update Arnd Bergmann
2019-04-26 15:17 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).