Skip to content

Commit 9962ed6

Browse files
ZhangPengakpm00
authored andcommitted
mm/page_io: remove unneeded SetPageError()
Nobody checks the PageError()/folio_test_error() for the page/folio in __end_swap_bio_read/write() and sio_write_complete(). Therefore, we don't need to set the error flag. Just drop it. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: ZhangPeng <[email protected]> Suggested-by: Matthew Wilcox (Oracle) <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Kefeng Wang <[email protected]> Cc: Nanyong Sun <[email protected]> Cc: Sidhartha Kumar <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 479c330 commit 9962ed6

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

mm/page_io.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ static void __end_swap_bio_write(struct bio *bio)
3232
struct page *page = bio_first_page_all(bio);
3333

3434
if (bio->bi_status) {
35-
SetPageError(page);
3635
/*
3736
* We failed to write the page out to swap-space.
3837
* Re-dirty the page in order to avoid it being reclaimed.
@@ -61,7 +60,6 @@ static void __end_swap_bio_read(struct bio *bio)
6160
struct page *page = bio_first_page_all(bio);
6261

6362
if (bio->bi_status) {
64-
SetPageError(page);
6563
pr_alert_ratelimited("Read-error on swap-device (%u:%u:%llu)\n",
6664
MAJOR(bio_dev(bio)), MINOR(bio_dev(bio)),
6765
(unsigned long long)bio->bi_iter.bi_sector);
@@ -415,7 +413,6 @@ static void sio_read_complete(struct kiocb *iocb, long ret)
415413
for (p = 0; p < sio->pages; p++) {
416414
struct page *page = sio->bvec[p].bv_page;
417415

418-
SetPageError(page);
419416
unlock_page(page);
420417
}
421418
pr_alert_ratelimited("Read-error on swap-device\n");

0 commit comments

Comments
 (0)