From ea193f0e396c0bef6511083defafb230a9ac362e Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Tue, 19 Dec 2006 15:25:52 -0800 Subject: [PATCH] --- yaml --- r: 45149 b: refs/heads/master c: 6c2aad0567e693f9588d0a0683f96ed872fb4641 h: refs/heads/master i: 45147: ccbf2d944a47612a5d277ae7fc45123531eda872 v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/file.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index a223da7124ed..c16244444285 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 564f8a3228879d6962edb3432d01bcd7499a67ec +refs/heads/master: 6c2aad0567e693f9588d0a0683f96ed872fb4641 diff --git a/trunk/fs/ocfs2/file.c b/trunk/fs/ocfs2/file.c index a50447d461e5..10953a508f2f 100644 --- a/trunk/fs/ocfs2/file.c +++ b/trunk/fs/ocfs2/file.c @@ -149,6 +149,17 @@ int ocfs2_should_update_atime(struct inode *inode, ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))) return 0; + /* + * We can be called with no vfsmnt structure - NFSD will + * sometimes do this. + * + * Note that our action here is different than touch_atime() - + * if we can't tell whether this is a noatime mount, then we + * don't know whether to trust the value of s_atime_quantum. + */ + if (vfsmnt == NULL) + return 0; + if ((vfsmnt->mnt_flags & MNT_NOATIME) || ((vfsmnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))) return 0;