linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: "Riccardo S." <sirmy15@gmail.com>
Cc: Andreas Dilger <adilger@dilger.ca>,
	linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 3/3] fs/ext4: create ext4_kset dynamically
Date: Thu, 11 Jan 2018 15:40:54 -0500	[thread overview]
Message-ID: <20180111204054.GI19241@thunk.org> (raw)
In-Reply-To: <20171128105147.GC83442@rschirone-mbp.local>

On Tue, Nov 28, 2017 at 11:51:47AM +0100, Riccardo S. wrote:
> On 11/27, Andreas Dilger wrote:
> > On Nov 27, 2017, at 4:18 PM, Riccardo Schirone <sirmy15@gmail.com> wrote:
> > > 
> > > -	ext4_feat->kset = &ext4_kset;
> > > +	ext4_feat->kset = ext4_kset;
> > > 	ret = kobject_init_and_add(ext4_feat, &ext4_feat_ktype,
> > > 				   NULL, "features");
> > > 	if (ret)
> > > @@ -455,14 +464,14 @@ int __init ext4_init_sysfs(void)
> > > feat_err:
> > > 	kobject_put(ext4_feat);
> > > kset_err:
> > > -	kset_unregister(&ext4_kset);
> > > +	kset_unregister(ext4_kset);
> > 
> > 
> > It would be prudent in this case to set "ext4_kset = NULL" here
> > so that it isn't cleaned up again somewhere else.  Otherwise,
> > it seems possible that ext4_kset could be cleaned up twice.
> > 
> > Otherwise, the whole premise of this patch seems flawed.
> 
> Right, I'll do it in V2.

I don't think we ever got a V2, so I've applied this patch with
Andreas's suggestions.

  	      	      	    	    	 - Ted
					 

  reply	other threads:[~2018-01-11 20:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 23:17 [PATCH 0/3] Improve kobject handling in fs/ext4 Riccardo Schirone
2017-11-27 23:17 ` [PATCH 1/3] fs/ext4: release kobject/kset even when init/register fail Riccardo Schirone
2017-11-27 23:34   ` Andreas Dilger
2017-11-28 11:03     ` Riccardo S.
2018-01-11 20:10   ` Theodore Ts'o
2017-11-27 23:18 ` [PATCH 2/3] fs/ext4: create ext4_feat kobject dynamically Riccardo Schirone
2018-01-11 20:17   ` Theodore Ts'o
2017-11-27 23:18 ` [PATCH 3/3] fs/ext4: create ext4_kset dynamically Riccardo Schirone
2017-11-27 23:44   ` Andreas Dilger
2017-11-28 10:51     ` Riccardo S.
2018-01-11 20:40       ` Theodore Ts'o [this message]
2017-11-28  3:51 ` [PATCH 0/3] Improve kobject handling in fs/ext4 Theodore Ts'o
2017-11-28 10:50   ` Riccardo S.

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=20180111204054.GI19241@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sirmy15@gmail.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).