aboutsummaryrefslogtreecommitdiff
path: root/mm/filemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index d9bbea1e87d..91a741ddd49 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;