aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 9fd590b9bde3..10953a508f2f 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -149,6 +149,17 @@ int ocfs2_should_update_atime(struct inode *inode,
149 ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode))) 149 ((inode->i_sb->s_flags & MS_NODIRATIME) && S_ISDIR(inode->i_mode)))
150 return 0; 150 return 0;
151 151
152 /*
153 * We can be called with no vfsmnt structure - NFSD will
154 * sometimes do this.
155 *
156 * Note that our action here is different than touch_atime() -
157 * if we can't tell whether this is a noatime mount, then we
158 * don't know whether to trust the value of s_atime_quantum.
159 */
160 if (vfsmnt == NULL)
161 return 0;
162
152 if ((vfsmnt->mnt_flags & MNT_NOATIME) || 163 if ((vfsmnt->mnt_flags & MNT_NOATIME) ||
153 ((vfsmnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))) 164 ((vfsmnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode)))
154 return 0; 165 return 0;
@@ -966,8 +977,6 @@ int ocfs2_permission(struct inode *inode, int mask, struct nameidata *nd)
966 } 977 }
967 978
968 ret = generic_permission(inode, mask, NULL); 979 ret = generic_permission(inode, mask, NULL);
969 if (ret)
970 mlog_errno(ret);
971 980
972 ocfs2_meta_unlock(inode, 0); 981 ocfs2_meta_unlock(inode, 0);
973out: 982out: