diff mbox series

[RFC,15/18] power/swap: set bio iopriority field

Message ID 20190501042831.5313-16-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series blktrace: add blktrace extension support | expand

Commit Message

Chaitanya Kulkarni May 1, 2019, 4:28 a.m. UTC
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 kernel/power/swap.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index d7f6c1a288d3..74b6d11fabe2 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -33,6 +33,7 @@ 
 #include <linux/kthread.h>
 #include <linux/crc32.h>
 #include <linux/ktime.h>
+#include <linux/ioprio.h>
 
 #include "power.h"
 
@@ -273,6 +274,7 @@  static int hib_submit_io(int op, int op_flags, pgoff_t page_off, void *addr,
 	bio->bi_iter.bi_sector = page_off * (PAGE_SIZE >> 9);
 	bio_set_dev(bio, hib_resume_bdev);
 	bio_set_op_attrs(bio, op, op_flags);
+	bio_set_prio(bio, get_current_ioprio());
 
 	if (bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) {
 		pr_err("Adding page to bio failed at %llu\n",