aboutsummaryrefslogtreecommitdiffstats
path: root/block/bio.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-06-27 09:31:50 +0200
committerJens Axboe <axboe@kernel.dk>2020-06-29 09:09:08 -0600
commita18b9b1590ca64f877588700de32c9ad236f405c (patch)
treee984aa8eff7b32e7fde1412f638107413c722c71 /block/bio.c
parentblock: merge __bio_associate_blkg into bio_associate_blkg_from_css (diff)
downloadlinux-dev-a18b9b1590ca64f877588700de32c9ad236f405c.tar.xz
linux-dev-a18b9b1590ca64f877588700de32c9ad236f405c.zip
block: move bio_associate_blkg_from_page to mm/page_io.c
bio_associate_blkg_from_page is a special purpose helper for swap bios that doesn't need access to bio internals. Move it to the swap code instead of having it in bio.c. Acked-by: Tejun Heo <tj@kernel.org> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/block/bio.c b/block/bio.c
index bc8de2432e36..901d22715dd4 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1659,32 +1659,6 @@ void bio_associate_blkg_from_css(struct bio *bio,
}
EXPORT_SYMBOL_GPL(bio_associate_blkg_from_css);
-#ifdef CONFIG_MEMCG
-/**
- * bio_associate_blkg_from_page - associate a bio with the page's blkg
- * @bio: target bio
- * @page: the page to lookup the blkcg from
- *
- * Associate @bio with the blkg from @page's owning memcg and the respective
- * request_queue. If cgroup_e_css returns %NULL, fall back to the queue's
- * root_blkg.
- */
-void bio_associate_blkg_from_page(struct bio *bio, struct page *page)
-{
- struct cgroup_subsys_state *css;
-
- if (!page->mem_cgroup)
- return;
-
- rcu_read_lock();
-
- css = cgroup_e_css(page->mem_cgroup->css.cgroup, &io_cgrp_subsys);
- bio_associate_blkg_from_css(bio, css);
-
- rcu_read_unlock();
-}
-#endif /* CONFIG_MEMCG */
-
/**
* bio_associate_blkg - associate a bio with a blkg
* @bio: target bio