summaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2017-05-04 08:17:21 -0600
committerJens Axboe <axboe@fb.com>2017-05-04 08:24:13 -0600
commit9c1051aacde828073dbbab5e8e59c0fc802efa9a (patch)
treec0e06f43aaf1c1fa908ebe2f196d24a0f42992f5 /block/blk-core.c
parentd173a25165c124442182f6b21d0c2ec381a0eebe (diff)
downloadlinux-stable-9c1051aacde828073dbbab5e8e59c0fc802efa9a.tar.gz
linux-stable-9c1051aacde828073dbbab5e8e59c0fc802efa9a.tar.bz2
linux-stable-9c1051aacde828073dbbab5e8e59c0fc802efa9a.zip
blk-mq: untangle debugfs and sysfs
Originally, I tied debugfs registration/unregistration together with sysfs. There's no reason to do this, and it's getting in the way of letting schedulers define their own debugfs attributes. Instead, tie the debugfs registration to the lifetime of the structures themselves. The saner lifetimes mean we can also get rid of the extra mq directory and move everything one level up. I.e., nvme0n1/mq/hctx0/tags is now just nvme0n1/hctx0/tags. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index acdca6536562..c580b0138a7f 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -40,7 +40,6 @@
#include "blk.h"
#include "blk-mq.h"
-#include "blk-mq-debugfs.h"
#include "blk-mq-sched.h"
#include "blk-wbt.h"
@@ -562,13 +561,9 @@ void blk_cleanup_queue(struct request_queue *q)
* prevent that q->request_fn() gets invoked after draining finished.
*/
blk_freeze_queue(q);
- if (!q->mq_ops) {
- spin_lock_irq(lock);
+ spin_lock_irq(lock);
+ if (!q->mq_ops)
__blk_drain_queue(q, true);
- } else {
- blk_mq_debugfs_unregister_mq(q);
- spin_lock_irq(lock);
- }
queue_flag_set(QUEUE_FLAG_DEAD, q);
spin_unlock_irq(lock);