diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/filemap.c | 6 | ||||
-rw-r--r-- | mm/readahead.c | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index ec469235985..fef7d879ddf 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -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; |
diff --git a/mm/readahead.c b/mm/readahead.c index aa7ec424656..1ba736ac036 100644 --- a/mm/readahead.c +++ b/mm/readahead.c | |||
@@ -38,6 +38,7 @@ file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping) | |||
38 | ra->ra_pages = mapping->backing_dev_info->ra_pages; | 38 | ra->ra_pages = mapping->backing_dev_info->ra_pages; |
39 | ra->prev_page = -1; | 39 | ra->prev_page = -1; |
40 | } | 40 | } |
41 | EXPORT_SYMBOL_GPL(file_ra_state_init); | ||
41 | 42 | ||
42 | /* | 43 | /* |
43 | * Return max readahead size for this inode in number-of-pages. | 44 | * Return max readahead size for this inode in number-of-pages. |