Skip to content

Commit

Permalink
blk-cgroup: remove pointless CONFIG_BLOCK ifdefs
Browse files Browse the repository at this point in the history
No need to make BLK_CGROUP stubs conditional on CONFIG_BLOCK as they
can't be used without that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20220420042723.1010598-11-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed May 2, 2022
1 parent bbb1ebe commit 7f20ba7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions block/blk-cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,6 @@ struct blkcg_policy {
struct blkcg {
};

#ifdef CONFIG_BLOCK

static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg, void *key) { return NULL; }
static inline struct blkcg_gq *blk_queue_root_blkg(struct request_queue *q)
{ return NULL; }
Expand Down Expand Up @@ -554,7 +552,6 @@ static inline bool blk_cgroup_mergeable(struct request *rq, struct bio *bio) { r
#define blk_queue_for_each_rl(rl, q) \
for ((rl) = &(q)->root_rl; (rl); (rl) = NULL)

#endif /* CONFIG_BLOCK */
#endif /* CONFIG_BLK_CGROUP */

#endif /* _BLK_CGROUP_PRIVATE_H */
4 changes: 0 additions & 4 deletions include/linux/blk-cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,11 @@ struct cgroup_subsys_state *bio_blkcg_css(struct bio *bio);

static inline void blkcg_maybe_throttle_current(void) { }
static inline bool blk_cgroup_congested(void) { return false; }

#ifdef CONFIG_BLOCK
static inline void blkcg_schedule_throttle(struct request_queue *q, bool use_memdelay) { }
static inline struct cgroup_subsys_state *bio_blkcg_css(struct bio *bio)
{
return NULL;
}
#endif /* CONFIG_BLOCK */

#endif /* CONFIG_BLK_CGROUP */

int blkcg_set_fc_appid(char *app_id, u64 cgrp_id, size_t app_id_len);
Expand Down

0 comments on commit 7f20ba7

Please sign in to comment.