@@ -2214,23 +2214,16 @@ static int filemap_read_page(struct file
error = mapping->a_ops->readpage(file, page);
if (error)
return error;
- if (PageUptodate(page))
- return 0;
- error = lock_page_killable(page);
+ error = wait_on_page_locked_killable(page);
if (error)
return error;
- if (!PageUptodate(page)) {
- if (page->mapping == NULL) {
- /* page truncated */
- error = AOP_TRUNCATED_PAGE;
- } else {
- shrink_readahead_size_eio(&file->f_ra);
- error = -EIO;
- }
- }
- unlock_page(page);
- return error;
+ if (PageUptodate(page))
+ return 0;
+ if (!page->mapping) /* page truncated */
+ return AOP_TRUNCATED_PAGE;
+ shrink_readahead_size_eio(&file->f_ra);
+ return -EIO;
}
static bool filemap_range_uptodate(struct address_space *mapping,