From: "Mika Penttilä" <mika.penttila@nextfour.com>
To: LKML <linux-kernel@vger.kernel.org>,
Dan Williams <dan.j.williams@intel.com>
Subject: nvdimm/pmem device lifetime
Date: Fri, 28 Apr 2017 07:37:54 +0300 [thread overview]
Message-ID: <a84bb079-0de8-b79b-ae33-afe81f325e32@nextfour.com> (raw)
Hi,
Just wondering the pmem struct device vs gendisk lifetimes.. from pmem_attach_disk():
device_add_disk(dev, disk);
devm_add_action_or_reset(dev, pmem_release_disk, disk);
where:
static void pmem_release_disk(void *disk)
{
del_gendisk(disk);
put_disk(disk);
}
but device_add_disk() makes disk pin dev (as a parent), and it's unpinned by del_gendisk()
which is called when dev is released, but it's not because of this circular dependency?
--Mika
next reply other threads:[~2017-04-28 4:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 4:37 Mika Penttilä [this message]
2017-04-28 15:36 ` Dan Williams
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=a84bb079-0de8-b79b-ae33-afe81f325e32@nextfour.com \
--to=mika.penttila@nextfour.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
/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®