Revert "perf map: Fix dso->nsinfo refcounting"
[linux-2.6-microblaze.git] / block / blk-mq-debugfs.c
index 271f659..4b66d27 100644 (file)
@@ -937,6 +937,21 @@ void blk_mq_debugfs_unregister_sched(struct request_queue *q)
        q->sched_debugfs_dir = NULL;
 }
 
+static const char *rq_qos_id_to_name(enum rq_qos_id id)
+{
+       switch (id) {
+       case RQ_QOS_WBT:
+               return "wbt";
+       case RQ_QOS_LATENCY:
+               return "latency";
+       case RQ_QOS_COST:
+               return "cost";
+       case RQ_QOS_IOPRIO:
+               return "ioprio";
+       }
+       return "unknown";
+}
+
 void blk_mq_debugfs_unregister_rqos(struct rq_qos *rqos)
 {
        debugfs_remove_recursive(rqos->debugfs_dir);
@@ -972,6 +987,14 @@ void blk_mq_debugfs_register_sched_hctx(struct request_queue *q,
 {
        struct elevator_type *e = q->elevator->type;
 
+       /*
+        * If the parent debugfs directory has not been created yet, return;
+        * We will be called again later on with appropriate parent debugfs
+        * directory from blk_register_queue()
+        */
+       if (!hctx->debugfs_dir)
+               return;
+
        if (!e->hctx_debugfs_attrs)
                return;