block: remove QUEUE_FLAG_DEAD
[linux-2.6-microblaze.git] / block / blk-mq-debugfs.c
index 4d1ce9e..b80fae7 100644 (file)
@@ -116,7 +116,6 @@ static const char *const blk_queue_flag_name[] = {
        QUEUE_FLAG_NAME(NOXMERGES),
        QUEUE_FLAG_NAME(ADD_RANDOM),
        QUEUE_FLAG_NAME(SAME_FORCE),
-       QUEUE_FLAG_NAME(DEAD),
        QUEUE_FLAG_NAME(INIT_DONE),
        QUEUE_FLAG_NAME(STABLE_WRITES),
        QUEUE_FLAG_NAME(POLL),
@@ -151,11 +150,10 @@ static ssize_t queue_state_write(void *data, const char __user *buf,
        char opbuf[16] = { }, *op;
 
        /*
-        * The "state" attribute is removed after blk_cleanup_queue() has called
-        * blk_mq_free_queue(). Return if QUEUE_FLAG_DEAD has been set to avoid
-        * triggering a use-after-free.
+        * The "state" attribute is removed when the queue is removed.  Don't
+        * allow setting the state on a dying queue to avoid a use-after-free.
         */
-       if (blk_queue_dead(q))
+       if (blk_queue_dying(q))
                return -ENOENT;
 
        if (count >= sizeof(opbuf)) {