mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zdenek.kabelac@gmail.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	mbroz@redhat.com, tytso@mit.edu, jens.axboe@oracle.com,
	mingo@elte.hu
Subject: Re: [PATCH] Add missing blk_trace_remove_sysfs to be in pair with  blk_trace_init_sysfs
Date: Tue, 22 Sep 2009 09:57:52 +0200	[thread overview]
Message-ID: <c4e36d110909220057q6d9ce816yfcec7de4849c1969@mail.gmail.com> (raw)
In-Reply-To: <4AB86A03.7060207@cn.fujitsu.com>

2009/9/22 Li Zefan <lizf@cn.fujitsu.com>:
> Zdenek Kabelac wrote:
>> Subject: [PATCH] Add missing blk_trace_remove_sysfs to be in pair with
>> blk_trace_init_sysfs
>> From: Zdenek Kabelac <zkabelac@redhat.com>
>>
>> Adds missing blk_trace_remove_sysfs() to be in pair with
>> blk_trace_init_sysfs() introduced in commit
>> 1d54ad6da9192fed5dd3b60224d9f2dfea0dcd82.
>>
>> Problem was noticed via kmemleak backtrace when some sysfs entries
>> were note properly destroyed during  device removal:
>>
>
> Thanks for reporting and fixing this!
>
>> @@ -465,6 +466,7 @@ void blk_unregister_queue(struct gendisk *disk)
>>
>>               kobject_uevent(&q->kobj, KOBJ_REMOVE);
>>               kobject_del(&q->kobj);
>> +             blk_trace_remove_sysfs(disk_to_dev(disk));
>
> This should be moved outside of 'if'.
>

I was not really sure about the proper place - if it could be placed
before if() or after the if(){} - as I've not checked in depth
connection between kobj and sysfs. It's somewhat unclear why all the
kobject operation are only within this if(){} block - so I've thought
there is some reason...
IMHO only elv_unregister_queue() should be probably in the if(){} block.

Feel free to update/fix.

Zdenek

  reply	other threads:[~2009-09-22  7:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-21 10:07 Zdenek Kabelac
2009-09-22  6:09 ` Li Zefan
2009-09-22  7:57   ` Zdenek Kabelac [this message]
2009-09-24  1:07     ` Li Zefan
2009-09-24 10:26       ` Zdenek Kabelac
2009-09-25  0:59         ` Li Zefan
2009-09-25  4:16         ` Jens Axboe

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=c4e36d110909220057q6d9ce816yfcec7de4849c1969@mail.gmail.com \
    --to=zdenek.kabelac@gmail.com \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mbroz@redhat.com \
    --cc=mingo@elte.hu \
    --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 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®