Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320985
b: refs/heads/master
c: 5d37e9e
h: refs/heads/master
i:
  320983: ad2be68
v: v3
  • Loading branch information
Jan Kara authored and Al Viro committed Jul 31, 2012
1 parent 4bc1ca0 commit 3a715a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: eb04c28288bb0098d0e75d81ba2a575239de71d8
refs/heads/master: 5d37e9e6dec65cd21be68ee92de99686213e916b
8 changes: 6 additions & 2 deletions trunk/fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1542,9 +1542,11 @@ void touch_atime(struct path *path)
if (timespec_equal(&inode->i_atime, &now))
return;

if (mnt_want_write(mnt))
if (!sb_start_write_trylock(inode->i_sb))
return;

if (__mnt_want_write(mnt))
goto skip_update;
/*
* File systems can error out when updating inodes if they need to
* allocate new space to modify an inode (such is the case for
Expand All @@ -1553,7 +1555,9 @@ void touch_atime(struct path *path)
* so just ignore the return value.
*/
update_time(inode, &now, S_ATIME);
mnt_drop_write(mnt);
__mnt_drop_write(mnt);
skip_update:
sb_end_write(inode->i_sb);
}
EXPORT_SYMBOL(touch_atime);

Expand Down

0 comments on commit 3a715a5

Please sign in to comment.