Merge branch 'master' into gfs2
[linux-2.6.git] / mm / filemap.c
index afcdc72b5e906658475a8ff47b5e3dcd389c0188..87d4a398cd16d304945c16b9d4eb17e26d1ac54a 100644 (file)
@@ -1197,8 +1197,10 @@ __generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
                        if (retval > 0)
                                *ppos = pos + retval;
                }
-               file_accessed(filp);
-               goto out;
+               if (likely(retval != 0)) {
+                       file_accessed(filp);
+                       goto out;
+               }
        }
 
        retval = 0;