Re: [PATCH] blk-mq: put the reference of the io scheduler module after switching back

From: Jinlong Chen
Date: Thu Oct 13 2022 - 10:18:48 EST


>
> But I don't see elevator_switch() release the referenct of the module
> it is switching from. It's still not balance to me.
>

The reference count is released here:

elevator_switch_mq()
--> elevator_exit()
--> __elevator_exit()
--> kobject_put()
--> kobject_release()
--> elevator_release()
--> elevator_put()

What a deep call stack. :)

Sincerely,
Jinlong Chen