Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6c2aad0567e693f9588d0a0683f96ed872fb4641
Commit:     6c2aad0567e693f9588d0a0683f96ed872fb4641
Parent:     564f8a3228879d6962edb3432d01bcd7499a67ec
Author:     Mark Fasheh <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 19 15:25:52 2006 -0800
Committer:  Mark Fasheh <[EMAIL PROTECTED]>
CommitDate: Thu Dec 28 16:38:32 2006 -0800

    ocfs2: ignore NULL vfsmnt in ocfs2_should_update_atime()
    
    This can come from NFSD.
    
    Signed-off-by: Mark Fasheh <[EMAIL PROTECTED]>
---
 fs/ocfs2/file.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index a50447d..10953a5 100644
--- a/fs/ocfs2/file.c
+++ b/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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to