From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Hannes Reinecke <hare@suse.de>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 7/8] Fix refcounting for attribute_container
Date: Sun, 23 Mar 2008 09:59:47 -0500 [thread overview]
Message-ID: <1206284387.3494.8.camel@localhost.localdomain> (raw)
In-Reply-To: <20080318133228.7B58F159166@pentland.suse.de>
On Tue, 2008-03-18 at 14:32 +0100, Hannes Reinecke wrote:
> attribute_container_add_device() takes an explicit reference on the
> parent device, making it impossible to remove the parent by doing
> a simple put_device(). So we'd rather _not_ take a reference here as
> attribute_container will be handled explicitly by calls to
> attribute_container_remove_device()/_destroy_device() anyway.
I really don't think this is right. The attribute container does hold a
reference to the device, so we should make it explicit. You could argue
that in the new parent indicates class device model there's *already* a
reference, so this one is superfluous, but it does help to make the
relationship explicit. Regardless, because we have an implicit
reference, your comment for the patch can't work (whether we explicitly
take the ref or not, you can't expect the device to be unrefereced by
the attribute container).
James
prev parent reply other threads:[~2008-03-23 14:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 13:32 [PATCH 7/8] Fix refcounting for attribute_container Hannes Reinecke
2008-03-23 14:59 ` James Bottomley [this message]
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=1206284387.3494.8.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=hare@suse.de \
--cc=linux-scsi@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