From b61a17a19a4b9debd19a72069d891dd767d9a6b6 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Wed, 13 Dec 2006 00:34:35 -0800 Subject: [PATCH] --- yaml --- r: 44466 b: refs/heads/master c: 7e913c53609d5e8374f55d6f29c0bcd6650a2362 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/file.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 825f5afe8841..261d50c455b6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 47ae32d6a54955a041cdc30b06d0bb16e75f68d5 +refs/heads/master: 7e913c53609d5e8374f55d6f29c0bcd6650a2362 diff --git a/trunk/fs/ocfs2/file.c b/trunk/fs/ocfs2/file.c index e9a82ad95c1e..9fd590b9bde3 100644 --- a/trunk/fs/ocfs2/file.c +++ b/trunk/fs/ocfs2/file.c @@ -153,6 +153,14 @@ int ocfs2_should_update_atime(struct inode *inode, ((vfsmnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))) return 0; + if (vfsmnt->mnt_flags & MNT_RELATIME) { + if ((timespec_compare(&inode->i_atime, &inode->i_mtime) <= 0) || + (timespec_compare(&inode->i_atime, &inode->i_ctime) <= 0)) + return 1; + + return 0; + } + now = CURRENT_TIME; if ((now.tv_sec - inode->i_atime.tv_sec <= osb->s_atime_quantum)) return 0;