mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* nvdimm/pmem device lifetime
@ 2017-04-28  4:37 Mika Penttilä
  2017-04-28 15:36 ` Dan Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Mika Penttilä @ 2017-04-28  4:37 UTC (permalink / raw)
  To: LKML, Dan Williams

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-28 15:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-28  4:37 nvdimm/pmem device lifetime Mika Penttilä
2017-04-28 15:36 ` Dan Williams

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®