summaryrefslogtreecommitdiffstats
path: root/block/bio.c
diff options
context:
space:
mode:
authorShaohua Li <shli@fb.com>2017-09-14 17:02:05 -0400
committerJens Axboe <axboe@kernel.dk>2017-09-26 09:41:22 -0400
commitaf551fb3be26a22b7a6b345b3b7e7e6acfc41758 (patch)
tree775f393998555a5b11473d3e342e817a2e4fbd7d /block/bio.c
parent05e3db95ebfc5c06a29a1d8c7a3e02f46f3a25a7 (diff)
blkcg: delete unused APIs
Nobody uses the APIs right now. Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/block/bio.c b/block/bio.c
index b38e962fa83e..8338304ea256 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -2033,37 +2033,6 @@ int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state *blkcg_css)
2033EXPORT_SYMBOL_GPL(bio_associate_blkcg); 2033EXPORT_SYMBOL_GPL(bio_associate_blkcg);
2034 2034
2035/** 2035/**
2036 * bio_associate_current - associate a bio with %current
2037 * @bio: target bio
2038 *
2039 * Associate @bio with %current if it hasn't been associated yet. Block
2040 * layer will treat @bio as if it were issued by %current no matter which
2041 * task actually issues it.
2042 *
2043 * This function takes an extra reference of @task's io_context and blkcg
2044 * which will be put when @bio is released. The caller must own @bio,
2045 * ensure %current->io_context exists, and is responsible for synchronizing
2046 * calls to this function.
2047 */
2048int bio_associate_current(struct bio *bio)
2049{
2050 struct io_context *ioc;
2051
2052 if (bio->bi_css)
2053 return -EBUSY;
2054
2055 ioc = current->io_context;
2056 if (!ioc)
2057 return -ENOENT;
2058
2059 get_io_context_active(ioc);
2060 bio->bi_ioc = ioc;
2061 bio->bi_css = task_get_css(current, io_cgrp_id);
2062 return 0;
2063}
2064EXPORT_SYMBOL_GPL(bio_associate_current);
2065
2066/**
2067 * bio_disassociate_task - undo bio_associate_current() 2036 * bio_disassociate_task - undo bio_associate_current()
2068 * @bio: target bio 2037 * @bio: target bio
2069 */ 2038 */