[RFC PATCH 32/34] mm: use bio_new in __swap_writepage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: linux-xfs@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, linux-fscrypt@xxxxxxxxxxxxxxx, jfs-discussion@xxxxxxxxxxxxxxxxxxxxx, linux-nilfs@xxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
- Subject: [RFC PATCH 32/34] mm: use bio_new in __swap_writepage
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Wed, 27 Jan 2021 23:11:31 -0800
- In-reply-to: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- Ironport-sdr: i7UYWM5gJO0n5ylMYKXu+lqPqWEUkpmId0oK/F2ZDyRwvJaO6xxMV4fB5Uau35FzGYaZdqTlby LsaoWQ6xKNGOj1tGk8pxROc58F9zfsyo2r+bD7gToTUPAg3amHa2kUfvyz3zXtzbuq6T5jB0zb sgaLMtZ4F7Cw2t88I02ITBRodGs9HRdtmngNvagEzPTdowTSBD0GL6JNG+j7W02z8xcPzUujz5 b/42Y2E1z/7wgIwA21GPuWVXWK01cKUFYkNu2vdsSkwoBOThhFjrY+67C1KiosUQLSTRJRCPBh Cu0=
- Ironport-sdr: VVn7p2oirJFetn+fXn8SdScJXtaPX6VgF60wxE3EFCJvAIKUqakQDO9uK/nZ2DfOpok2GQ6JQ1 ptqYbS2r5Pg99oUjeGdp7lAK44mc7gyHNDFGw0h4Cl77gBfHVhOpOH3ItWoRM0K4Vo4oX8FuCd Cl8Hb8oI5syw4uyMAj+N9wTmYBXHyF4pYnHnjwL9Xd/LuEL8qeHErDIahn/62PJOxrBugxq2AQ G+WMV7LTDekg6zNIcTkPHO6p26QYLZCZY+M6px0lVX51PJ9z7Mfbf+DGkEeUQEIogr8mLlLao2 FyA2ZRLuxpG+snAwC1WtJ3zZ
- Ironport-sdr: Grws0RkRukNGo7nyou8ZmIctRPf+YpsLcKEKHc3Y9j2gH1wu+DvtqTycxE/+Um75XSsvYHsJz2 XuCl7g+xJPknbJtkfE6+aL2ksGkx9esZlvJSCaOOok8lPoOpNpuMTJUvJF76PXh6twtzc4hV4l Ck271Nzyl0bN3jPxPpXSp854weGQ+wyoheQ1qJh2ewh7GEZUQlec6Cx5gMyzUS7NDfOacpsNSA i4cQzL4qbQiTmP11yVUjlWBUXU4/5eKNIGO+C/0onsAsvTsPxAAYkHYwd4fug7gJV2TpCU6JnF 3ZY=
- References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- Wdcironportexception: Internal
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
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
[Index of Archives]
[linux Cryptography]
[Asterisk App Development]
[PJ SIP]
[Gnu Gatekeeper]
[IETF Sipping]
[Info Cyrus]
[ALSA User]
[Fedora Linux Users]
[Linux SCTP]
[DCCP]
[Gimp]
[Yosemite News]
[Deep Creek Hot Springs]
[Yosemite Campsites]
[ISDN Cause Codes]