Skip to content

Commit 7f20ba7

Browse files
Christoph Hellwigaxboe
authored andcommitted
blk-cgroup: remove pointless CONFIG_BLOCK ifdefs
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>
1 parent bbb1ebe commit 7f20ba7

2 files changed

Lines changed: 0 additions & 7 deletions

File tree

block/blk-cgroup.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,8 +525,6 @@ struct blkcg_policy {
525525
struct blkcg {
526526
};
527527

528-
#ifdef CONFIG_BLOCK
529-
530528
static inline struct blkcg_gq *blkg_lookup(struct blkcg *blkcg, void *key) { return NULL; }
531529
static inline struct blkcg_gq *blk_queue_root_blkg(struct request_queue *q)
532530
{ return NULL; }
@@ -554,7 +552,6 @@ static inline bool blk_cgroup_mergeable(struct request *rq, struct bio *bio) { r
554552
#define blk_queue_for_each_rl(rl, q) \
555553
for ((rl) = &(q)->root_rl; (rl); (rl) = NULL)
556554

557-
#endif /* CONFIG_BLOCK */
558555
#endif /* CONFIG_BLK_CGROUP */
559556

560557
#endif /* _BLK_CGROUP_PRIVATE_H */

include/linux/blk-cgroup.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,11 @@ struct cgroup_subsys_state *bio_blkcg_css(struct bio *bio);
4444

4545
static inline void blkcg_maybe_throttle_current(void) { }
4646
static inline bool blk_cgroup_congested(void) { return false; }
47-
48-
#ifdef CONFIG_BLOCK
4947
static inline void blkcg_schedule_throttle(struct request_queue *q, bool use_memdelay) { }
5048
static inline struct cgroup_subsys_state *bio_blkcg_css(struct bio *bio)
5149
{
5250
return NULL;
5351
}
54-
#endif /* CONFIG_BLOCK */
55-
5652
#endif /* CONFIG_BLK_CGROUP */
5753

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

0 commit comments

Comments
 (0)