mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jinlong Chen <chenjinlong2016@outlook.com>
To: yukuai1@huaweicloud.com
Cc: axboe@kernel.dk, chenjinlong2016@outlook.com,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
	yukuai3@huawei.com
Subject: Re: [PATCH] blk-mq: put the reference of the io scheduler module after switching back
Date: Thu, 13 Oct 2022 22:18:12 +0800	[thread overview]
Message-ID: <OSYP286MB0344A71BA994B77B9E2E46EDBE259@OSYP286MB0344.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <f1c07b2a-ffdd-0912-139d-d51b34b77bcd@huaweicloud.com>

> 
> 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

  reply	other threads:[~2022-10-13 14:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12  0:35 [PATCH v2] " Jinlong Chen
2022-10-13 13:03 ` [PATCH] " Jinlong Chen
2022-10-13 13:22   ` Yu Kuai
2022-10-13 13:47     ` Jinlong Chen
2022-10-13 14:05       ` Yu Kuai
2022-10-13 14:18         ` Jinlong Chen [this message]
2022-10-14  7:27           ` Yu Kuai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OSYP286MB0344A71BA994B77B9E2E46EDBE259@OSYP286MB0344.JPNP286.PROD.OUTLOOK.COM \
    --to=chenjinlong2016@outlook.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yukuai1@huaweicloud.com \
    --cc=yukuai3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®