All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu
Subject: Re: [PATCH] ext4: Unregister features interface on module unload
Date: Mon, 17 Jan 2011 12:40:00 -0600	[thread overview]
Message-ID: <4D348D00.20700@redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1101171919590.2695@dhcp-lab-213.englab.brq.redhat.com>

On 01/17/2011 12:21 PM, Lukas Czerner wrote:
> On Mon, 17 Jan 2011, Eric Sandeen wrote:
> 
>> On 01/17/2011 09:00 AM, Lukas Czerner wrote:
>>> Ext4 features interface was not properly unregistered which led to
>>> problems while unloading/reloading ext4 module. This commit fixes that by
>>> adding proper kobject unregistration code into ext4_exit_fs() as well as
>>> fail-path of ext4_init_fs()
>>>
>>> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
>>> Reported-by: Eric Sandeen <sandeen@redhat.com>
>>
>> Works for me!
>>
>> Tested-by: Eric Sandeen <sandeen@redhat.com>
>>
>> Thanks - probably needs to go to .37-stable too right?
> 
> Definitely, should I send it somewhere else then ?

Once it's upstream, send the upstream commit details to
stable@kernel.org, and which 2.6.3X.Y tree(s) it should apply to.

-Eric

> -Lukas
> 
>>
>> -Eric
>>
>>> ---
>>>  fs/ext4/super.c |   12 ++++++++++--
>>>  1 files changed, 10 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
>>> index cb10a06..124d304 100644
>>> --- a/fs/ext4/super.c
>>> +++ b/fs/ext4/super.c
>>> @@ -4779,7 +4779,7 @@ static struct file_system_type ext4_fs_type = {
>>>  	.fs_flags	= FS_REQUIRES_DEV,
>>>  };
>>>  
>>> -int __init ext4_init_feat_adverts(void)
>>> +static int __init ext4_init_feat_adverts(void)
>>>  {
>>>  	struct ext4_features *ef;
>>>  	int ret = -ENOMEM;
>>> @@ -4803,6 +4803,13 @@ out:
>>>  	return ret;
>>>  }
>>>  
>>> +static void ext4_exit_feat_adverts(void)
>>> +{
>>> +	kobject_put(&ext4_feat->f_kobj);
>>> +	wait_for_completion(&ext4_feat->f_kobj_unregister);
>>> +	kfree(ext4_feat);
>>> +}
>>> +
>>>  static int __init ext4_init_fs(void)
>>>  {
>>>  	int err;
>>> @@ -4849,7 +4856,7 @@ out1:
>>>  out2:
>>>  	ext4_exit_mballoc();
>>>  out3:
>>> -	kfree(ext4_feat);
>>> +	ext4_exit_feat_adverts();
>>>  	remove_proc_entry("fs/ext4", NULL);
>>>  	kset_unregister(ext4_kset);
>>>  out4:
>>> @@ -4868,6 +4875,7 @@ static void __exit ext4_exit_fs(void)
>>>  	destroy_inodecache();
>>>  	ext4_exit_xattr();
>>>  	ext4_exit_mballoc();
>>> +	ext4_exit_feat_adverts();
>>>  	remove_proc_entry("fs/ext4", NULL);
>>>  	kset_unregister(ext4_kset);
>>>  	ext4_exit_system_zone();
>>
>>
> 


  reply	other threads:[~2011-01-17 18:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17 15:00 [PATCH] ext4: Unregister features interface on module unload Lukas Czerner
2011-01-17 18:09 ` Eric Sandeen
2011-01-17 18:21   ` Lukas Czerner
2011-01-17 18:40     ` Eric Sandeen [this message]
2011-01-18 19:41   ` Eric Sandeen
2011-01-18 20:10     ` Eric Sandeen
2011-01-24 17:49 ` Lukas Czerner
2011-02-03  5:53 ` Ted Ts'o
2011-02-03  5:55 ` [PATCH] ext4: fix up ext4 error handling Theodore Ts'o

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=4D348D00.20700@redhat.com \
    --to=sandeen@redhat.com \
    --cc=lczerner@redhat.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.