diff options
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index ec469235985d..3464b681f844 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1139,11 +1139,11 @@ success: | |||
1139 | } | 1139 | } |
1140 | 1140 | ||
1141 | /** | 1141 | /** |
1142 | * __generic_file_aio_read - generic filesystem read routine | 1142 | * generic_file_aio_read - generic filesystem read routine |
1143 | * @iocb: kernel I/O control block | 1143 | * @iocb: kernel I/O control block |
1144 | * @iov: io vector request | 1144 | * @iov: io vector request |
1145 | * @nr_segs: number of segments in the iovec | 1145 | * @nr_segs: number of segments in the iovec |
1146 | * @ppos: current file position | 1146 | * @pos: current file position |
1147 | * | 1147 | * |
1148 | * This is the "read()" routine for all filesystems | 1148 | * This is the "read()" routine for all filesystems |
1149 | * that can use the page cache directly. | 1149 | * that can use the page cache directly. |
@@ -1198,8 +1198,10 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov, | |||
1198 | if (retval > 0) | 1198 | if (retval > 0) |
1199 | *ppos = pos + retval; | 1199 | *ppos = pos + retval; |
1200 | } | 1200 | } |
1201 | file_accessed(filp); | 1201 | if (likely(retval != 0)) { |
1202 | goto out; | 1202 | file_accessed(filp); |
1203 | goto out; | ||
1204 | } | ||
1203 | } | 1205 | } |
1204 | 1206 | ||
1205 | retval = 0; | 1207 | retval = 0; |