File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -282,13 +282,7 @@ static void end_buffer_async_read(struct buffer_head *bh, int uptodate)
282
282
} while (tmp != bh );
283
283
spin_unlock_irqrestore (& first -> b_uptodate_lock , flags );
284
284
285
- /*
286
- * If all of the buffers are uptodate then we can set the page
287
- * uptodate.
288
- */
289
- if (folio_uptodate )
290
- folio_mark_uptodate (folio );
291
- folio_unlock (folio );
285
+ folio_end_read (folio , folio_uptodate );
292
286
return ;
293
287
294
288
still_busy :
@@ -2433,12 +2427,10 @@ int block_read_full_folio(struct folio *folio, get_block_t *get_block)
2433
2427
2434
2428
if (!nr ) {
2435
2429
/*
2436
- * All buffers are uptodate - we can set the folio uptodate
2437
- * as well. But not if get_block() returned an error .
2430
+ * All buffers are uptodate or get_block() returned an
2431
+ * error when trying to map them - we can finish the read .
2438
2432
*/
2439
- if (!page_error )
2440
- folio_mark_uptodate (folio );
2441
- folio_unlock (folio );
2433
+ folio_end_read (folio , !page_error );
2442
2434
return 0 ;
2443
2435
}
2444
2436
You can’t perform that action at this time.
0 commit comments