Skip to content

Commit bc74b53

Browse files
ZhangPengakpm00
authored andcommitted
mm/page_io: use a folio in __end_swap_bio_read()
Saves one implicit call to compound_head(). Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: ZhangPeng <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Kefeng Wang <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Nanyong Sun <[email protected]> Cc: Sidhartha Kumar <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent a3ed1e9 commit bc74b53

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mm/page_io.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,16 @@ static void end_swap_bio_write(struct bio *bio)
5757

5858
static void __end_swap_bio_read(struct bio *bio)
5959
{
60-
struct page *page = bio_first_page_all(bio);
60+
struct folio *folio = bio_first_folio_all(bio);
6161

6262
if (bio->bi_status) {
6363
pr_alert_ratelimited("Read-error on swap-device (%u:%u:%llu)\n",
6464
MAJOR(bio_dev(bio)), MINOR(bio_dev(bio)),
6565
(unsigned long long)bio->bi_iter.bi_sector);
6666
} else {
67-
SetPageUptodate(page);
67+
folio_mark_uptodate(folio);
6868
}
69-
unlock_page(page);
69+
folio_unlock(folio);
7070
}
7171

7272
static void end_swap_bio_read(struct bio *bio)

0 commit comments

Comments
 (0)