[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>
This commit is contained in:
Steven Whitehouse 2006-09-27 14:45:07 -04:00
parent 7e18c02be7
commit 0e0bcae3bf
1 changed files with 3 additions and 2 deletions

View File

@ -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;