From: Joel Becker <Joel.Becker@oracle.com>
To: Louis Rilling <Louis.Rilling@kerlabs.com>
Cc: linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com,
ocfs2-devel@oss.oracle.com
Subject: Re: [RFC] configfs: Pin configfs subsystems separately from new config_items.
Date: Tue, 24 Jun 2008 10:03:10 -0700 [thread overview]
Message-ID: <20080624170310.GB4184@ca-server1.us.oracle.com> (raw)
In-Reply-To: <20080624050423.GA4193@localdomain>
On Tue, Jun 24, 2008 at 07:04:23AM +0200, Louis Rilling wrote:
> Yup, I realized it this night (prevented me from sleeping by the way).
> The previous arguments remain valid though. I hope that you won't discard
> them because of this buggy one :)
I'm quite happy with the current code, and I figure to leave it
(taking a module_get() on item->owner). Thanks for thinking it out with
me.
> struct config_item * item = to_item(filp->f_path.dentry->d_parent);
> [...]
> if (item)
> config_item_put(item);
>
> It looks strange:
> 1/ either item may be NULL, and there is a probable memory leak because of the
> reference grabbed in configfs_open_file();
> 2/ or item may never be NULL and this check is just useless and (at least for
> me) misleading.
>
> If I understand correctly, option 2 is correct because
I think you are right about (2), but I'm not changing it. That
code comes from sysfs and I try not to change it unless its wrong.
sysfs has actually changed their handling over time. What I try to do
is keep track of such changes and sometimes bring them over if
warranted. I haven't had a chance to look at the new way sysfs does it.
Joel
--
f/8 and be there.
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127
prev parent reply other threads:[~2008-06-24 17:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-17 22:41 [RFC] configfs: Pin configfs subsystems separately from new config_items Joel Becker
2008-06-18 12:31 ` [Ocfs2-devel] " Louis Rilling
2008-06-18 16:12 ` Joel Becker
2008-06-18 16:51 ` Louis Rilling
2008-06-18 20:07 ` Joel Becker
2008-06-19 11:13 ` [Ocfs2-devel] " Louis Rilling
2008-06-19 22:07 ` Joel Becker
2008-06-20 12:46 ` Louis Rilling
2008-06-20 22:36 ` Joel Becker
2008-06-23 15:44 ` Louis Rilling
2008-06-23 19:10 ` Joel Becker
2008-06-24 5:04 ` Louis Rilling
2008-06-24 17:03 ` Joel Becker [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=20080624170310.GB4184@ca-server1.us.oracle.com \
--to=joel.becker@oracle.com \
--cc=Louis.Rilling@kerlabs.com \
--cc=cluster-devel@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ocfs2-devel@oss.oracle.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;
as well as URLs for NNTP newsgroup(s).