lkml.org 
[lkml]   [2021]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 32/34] mm: use bio_new in __swap_writepage
Date
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
mm/page_io.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/mm/page_io.c b/mm/page_io.c
index 92f7941c6d01..25b321489703 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -342,10 +342,8 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
return 0;
}

- bio = bio_alloc(GFP_NOIO, 1);
- bio_set_dev(bio, sis->bdev);
- bio->bi_iter.bi_sector = swap_page_sector(page);
- bio->bi_opf = REQ_OP_WRITE | REQ_SWAP | wbc_to_write_flags(wbc);
+ bio = bio_alloc(sis->bdev, swap_page_sector(page), REQ_OP_WRITE,
+ REQ_SWAP | wbc_to_write_flags(wbc), 1, GFP_NOIO);
bio->bi_end_io = end_write_func;
bio_add_page(bio, page, thp_size(page), 0);

--
2.22.1
\
 
 \ /
  Last update: 2021-01-28 08:26    [W:0.223 / U:0.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site