]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
blkcg: delete unused APIs
authorShaohua Li <shli@fb.com>
Thu, 14 Sep 2017 21:02:05 +0000 (14:02 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 26 Sep 2017 13:41:22 +0000 (07:41 -0600)
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>
block/bio.c
include/linux/bio.h
include/linux/blk-cgroup.h

index b38e962fa83e774c5c9121bbbe277124d13dd793..8338304ea25637b85388aa19335b9a482e88885b 100644 (file)
@@ -2032,37 +2032,6 @@ int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state *blkcg_css)
 }
 EXPORT_SYMBOL_GPL(bio_associate_blkcg);
 
-/**
- * bio_associate_current - associate a bio with %current
- * @bio: target bio
- *
- * Associate @bio with %current if it hasn't been associated yet.  Block
- * layer will treat @bio as if it were issued by %current no matter which
- * task actually issues it.
- *
- * This function takes an extra reference of @task's io_context and blkcg
- * which will be put when @bio is released.  The caller must own @bio,
- * ensure %current->io_context exists, and is responsible for synchronizing
- * calls to this function.
- */
-int bio_associate_current(struct bio *bio)
-{
-       struct io_context *ioc;
-
-       if (bio->bi_css)
-               return -EBUSY;
-
-       ioc = current->io_context;
-       if (!ioc)
-               return -ENOENT;
-
-       get_io_context_active(ioc);
-       bio->bi_ioc = ioc;
-       bio->bi_css = task_get_css(current, io_cgrp_id);
-       return 0;
-}
-EXPORT_SYMBOL_GPL(bio_associate_current);
-
 /**
  * bio_disassociate_task - undo bio_associate_current()
  * @bio: target bio
index 275c91c9951633282980cb3510c700322ff1e657..9c75f58f6a50152acfffb596d9455236c3d84066 100644 (file)
@@ -522,13 +522,11 @@ do {                                              \
 
 #ifdef CONFIG_BLK_CGROUP
 int bio_associate_blkcg(struct bio *bio, struct cgroup_subsys_state *blkcg_css);
-int bio_associate_current(struct bio *bio);
 void bio_disassociate_task(struct bio *bio);
 void bio_clone_blkcg_association(struct bio *dst, struct bio *src);
 #else  /* CONFIG_BLK_CGROUP */
 static inline int bio_associate_blkcg(struct bio *bio,
                        struct cgroup_subsys_state *blkcg_css) { return 0; }
-static inline int bio_associate_current(struct bio *bio) { return -ENOENT; }
 static inline void bio_disassociate_task(struct bio *bio) { }
 static inline void bio_clone_blkcg_association(struct bio *dst,
                        struct bio *src) { }
index 9d92153dd856f49eb927271e493a4416a2ea15a7..0cfa8d2ef4d6387066d962c0ced9a5802e308231 100644 (file)
@@ -235,12 +235,6 @@ static inline struct blkcg *bio_blkcg(struct bio *bio)
        return task_blkcg(current);
 }
 
-static inline struct cgroup_subsys_state *
-task_get_blkcg_css(struct task_struct *task)
-{
-       return task_get_css(task, io_cgrp_id);
-}
-
 /**
  * blkcg_parent - get the parent of a blkcg
  * @blkcg: blkcg of interest
@@ -735,12 +729,6 @@ struct blkcg_policy {
 
 #define blkcg_root_css ((struct cgroup_subsys_state *)ERR_PTR(-EINVAL))
 
-static inline struct cgroup_subsys_state *
-task_get_blkcg_css(struct task_struct *task)
-{
-       return NULL;
-}
-
 #ifdef CONFIG_BLOCK
 
 static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg, void *key) { return NULL; }