Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235055
b: refs/heads/master
c: b9c93bb
h: refs/heads/master
i:
  235053: 1869e7c
  235051: 9063ffa
  235047: 8be6d91
  235039: 9a47a35
v: v3
  • Loading branch information
Steven Whitehouse committed Feb 2, 2011
1 parent 2608dff commit 75ce7f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: edae38a6431276c50d4b51543c36de258722358e
refs/heads/master: b9c93bb7deadc7cdd00415edc6b38d67a26c1c7a
15 changes: 10 additions & 5 deletions trunk/fs/gfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,15 +448,20 @@ static int gfs2_mmap(struct file *file, struct vm_area_struct *vma)
{
struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);

if (!(file->f_flags & O_NOATIME)) {
if (!(file->f_flags & O_NOATIME) &&
!IS_NOATIME(&ip->i_inode)) {
struct gfs2_holder i_gh;
int error;

gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &i_gh);
gfs2_holder_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh);
error = gfs2_glock_nq(&i_gh);
file_accessed(file);
if (error == 0)
gfs2_glock_dq_uninit(&i_gh);
if (error == 0) {
file_accessed(file);
gfs2_glock_dq(&i_gh);
}
gfs2_holder_uninit(&i_gh);
if (error)
return error;
}
vma->vm_ops = &gfs2_vm_ops;
vma->vm_flags |= VM_CAN_NONLINEAR;
Expand Down

0 comments on commit 75ce7f1

Please sign in to comment.