diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-27 20:45:07 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-09-27 20:45:07 +0200 |
commit | 0e0bcae3bfb3c88dbe14735fa69d7d88794dc73a (patch) | |
tree | cccd335fd1d295d28a345bdcc1c8e0bf5974af47 | |
parent | [GFS2] Fix bug in Makefiles for lock modules (diff) | |
download | linux-0e0bcae3bfb3c88dbe14735fa69d7d88794dc73a.tar.xz linux-0e0bcae3bfb3c88dbe14735fa69d7d88794dc73a.zip |
[GFS2] Fix direct i/o logic in filemap.c
We shouldn't mark the file accessed in the case that it
wasn't accessed.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r-- | mm/filemap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index d9bbea1e87d2..91a741ddd49d 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1180,9 +1180,10 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, if (retval > 0) *ppos = pos + retval; } - file_accessed(filp); - if (retval != 0) + if (likely(retval != 0)) { + file_accessed(flip); goto out; + } } retval = 0; |