From: Greg KH <greg@kroah.com>
To: Milan Broz <mbroz@redhat.com>, Alasdair G Kergon <agk@redhat.com>
Cc: linux-kernel@vger.kernel.org, dm-devel@redhat.com
Subject: Re: dm: sysfs add empty release function to avoid debug warning
Date: Tue, 15 Dec 2009 16:47:39 -0800 [thread overview]
Message-ID: <20091216004739.GB4898@kroah.com> (raw)
In-Reply-To: <200912151735.nBFHZ8XP018683@hera.kernel.org>
On Tue, Dec 15, 2009 at 05:35:08PM +0000, James Bottomley wrote:
> commit: d2bb7df8cac647b92f51fb84ae735771e7adbfa7
> From: Milan Broz <mbroz@redhat.com>
> Date: Thu, 10 Dec 2009 23:51:53 +0000
> Subject: [PATCH] dm: sysfs add empty release function to avoid debug warning
>
> This patch just removes an unnecessary warning:
> kobject: 'dm': does not have a release() function,
> it is broken and must be fixed.
>
> The kobject is embedded in mapped device struct, so
> code does not need to release memory explicitly here.
Oh no you did not!
Come on people, do you think that the kernel is just randomly spitting
out warnings because it fricken feels like it!
No, please revert this patch now before someone does it for you.
Please, this is totally and completly wrong. And if you feel that it is
needed, then your design is wrong and it needs to be fixed.
And note, as per the Documentation/kobject.txt file, you were warned
about this public mocking, next time it will be harsher.
Heh, and you tried to get this into a -stable kernel release, as if.
Patch left below so that others can mock.
bah,
greg k-h
>
> Cc: stable@kernel.org
> Signed-off-by: Milan Broz <mbroz@redhat.com>
> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
> ---
> drivers/md/dm-sysfs.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/md/dm-sysfs.c b/drivers/md/dm-sysfs.c
> index 4b04590..b000de3 100644
> --- a/drivers/md/dm-sysfs.c
> +++ b/drivers/md/dm-sysfs.c
> @@ -80,12 +80,20 @@ static struct sysfs_ops dm_sysfs_ops = {
> };
>
> /*
> + * The sysfs structure is embedded in md struct, nothing to do here
> + */
> +static void dm_sysfs_release(struct kobject *kobj)
> +{
> +}
> +
> +/*
> * dm kobject is embedded in mapped_device structure
> * no need to define release function here
> */
> static struct kobj_type dm_ktype = {
> .sysfs_ops = &dm_sysfs_ops,
> .default_attrs = dm_attrs,
> + .release = dm_sysfs_release
> };
>
> /*
>
> _______________________________________________
> stable mailing list
> stable@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/stable
next parent reply other threads:[~2009-12-16 0:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200912151735.nBFHZ8XP018683@hera.kernel.org>
2009-12-16 0:47 ` Greg KH [this message]
2009-12-16 9:44 ` Milan Broz
2009-12-16 13:45 ` Greg KH
2009-12-16 16:32 ` [dm-devel] " Zdenek Kabelac
2009-12-16 17:46 ` Greg KH
2009-12-16 18:40 ` Milan Broz
2009-12-17 0:30 ` Greg KH
2009-12-17 15:43 ` Milan Broz
2009-12-22 5:31 ` Greg KH
2009-12-16 23:25 ` Zdenek Kabelac
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=20091216004739.GB4898@kroah.com \
--to=greg@kroah.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbroz@redhat.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
all inboxes | Powered by JetHome®