Skip to content

Commit

Permalink
[GFS2] Fix direct i/o logic in filemap.c
Browse files Browse the repository at this point in the history
We shouldn't mark the file accessed in the case that it
wasn't accessed.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Steven Whitehouse committed Sep 27, 2006
1 parent 7e18c02 commit 0e0bcae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mm/filemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0e0bcae

Please sign in to comment.