> lockdep_assert_held(&q->elevator_lock); > > + if (test_bit(ELEVATOR_FLAG_REGISTERED, &e->flags)) > + return 0; > + This looks unrelate to the rest of the patch, and I also don't understand why it's needed as the callers of elv_register_queue don't change. The rest of the patch looks good to me.