diff options
author | Omar Sandoval <osandov@fb.com> | 2017-01-27 17:03:01 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-27 17:03:01 -0500 |
commit | 400f73b23f457a82288814e21af57dbc9f3f2afd (patch) | |
tree | 02e545b69739e1577c97f37ece486ccb555b8249 /block/blk-mq.h | |
parent | f3a8ab7d55bc49b44baa229723e0b5b6ebacac4a (diff) |
blk-mq: fix debugfs compilation issues
This fixes a couple of problems:
1. In the !CONFIG_DEBUG_FS case, the stub definitions were bogus.
2. In the !CONFIG_BLOCK case, blk-mq-debugfs.c shouldn't be compiled at
all.
Fix the stub definitions and add a CONFIG_BLK_DEBUG_FS Kconfig option.
Fixes: 07e4fead45e6 ("blk-mq: create debugfs directory tree")
Signed-off-by: Omar Sandoval <osandov@fb.com>
Augment Kconfig description.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r-- | block/blk-mq.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h index 57cdbf6c0cee..b52abd62b1b0 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h | |||
@@ -84,7 +84,7 @@ extern void blk_mq_hctx_kobj_init(struct blk_mq_hw_ctx *hctx); | |||
84 | /* | 84 | /* |
85 | * debugfs helpers | 85 | * debugfs helpers |
86 | */ | 86 | */ |
87 | #ifdef CONFIG_DEBUG_FS | 87 | #ifdef CONFIG_BLK_DEBUG_FS |
88 | void blk_mq_debugfs_init(void); | 88 | void blk_mq_debugfs_init(void); |
89 | int blk_mq_debugfs_register(struct request_queue *q, const char *name); | 89 | int blk_mq_debugfs_register(struct request_queue *q, const char *name); |
90 | void blk_mq_debugfs_unregister(struct request_queue *q); | 90 | void blk_mq_debugfs_unregister(struct request_queue *q); |
@@ -95,21 +95,22 @@ static inline void blk_mq_debugfs_init(void) | |||
95 | { | 95 | { |
96 | } | 96 | } |
97 | 97 | ||
98 | int blk_mq_debugfs_register(struct request_queue *q, const char *name); | 98 | static inline int blk_mq_debugfs_register(struct request_queue *q, |
99 | const char *name) | ||
99 | { | 100 | { |
100 | return 0; | 101 | return 0; |
101 | } | 102 | } |
102 | 103 | ||
103 | void blk_mq_debugfs_unregister(struct request_queue *q) | 104 | static inline void blk_mq_debugfs_unregister(struct request_queue *q) |
104 | { | 105 | { |
105 | } | 106 | } |
106 | 107 | ||
107 | int blk_mq_debugfs_register_hctxs(struct request_queue *q) | 108 | static inline int blk_mq_debugfs_register_hctxs(struct request_queue *q) |
108 | { | 109 | { |
109 | return 0; | 110 | return 0; |
110 | } | 111 | } |
111 | 112 | ||
112 | void blk_mq_debugfs_unregister_hctxs(struct request_queue *q) | 113 | static inline void blk_mq_debugfs_unregister_hctxs(struct request_queue *q) |
113 | { | 114 | { |
114 | } | 115 | } |
115 | #endif | 116 | #endif |