summaryrefslogtreecommitdiffstats
path: root/mm/page_io.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2018-07-03 11:14:54 -0400
committerJens Axboe <axboe@kernel.dk>2018-07-09 09:07:54 -0600
commit0d3bd88d54f513723602b361dccfc71639f50779 (patch)
tree349c7095f6e4faad0eadd64b516e80e1a0d3ef8d /mm/page_io.c
parent0d1e0c7cd5909d6c6aa0957179318e13fcca971a (diff)
downloadlinux-stable-0d3bd88d54f513723602b361dccfc71639f50779.tar.gz
linux-stable-0d3bd88d54f513723602b361dccfc71639f50779.tar.bz2
linux-stable-0d3bd88d54f513723602b361dccfc71639f50779.zip
swap,blkcg: issue swap io with the appropriate context
For backcharging we need to know who the page belongs to when swapping it out. We don't worry about things that do ->rw_page (zram etc) at the moment, we're only worried about pages that actually go to a block device. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Josef Bacik <jbacik@fb.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'mm/page_io.c')
-rw-r--r--mm/page_io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/page_io.c b/mm/page_io.c
index a552cb37e220..aafd19ec1db4 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -339,6 +339,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
goto out;
}
bio->bi_opf = REQ_OP_WRITE | REQ_SWAP | wbc_to_write_flags(wbc);
+ bio_associate_blkcg_from_page(bio, page);
count_swpout_vm_event(page);
set_page_writeback(page);
unlock_page(page);