[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CB36592.6060909@vlnb.net>
Date: Mon, 11 Oct 2010 23:29:22 +0400
From: Vladislav Bolkhovitin <vst@...b.net>
To: Greg KH <greg@...ah.com>
CC: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
scst-devel <scst-devel@...ts.sourceforge.net>,
James Bottomley <James.Bottomley@...senPartnership.com>,
Andrew Morton <akpm@...ux-foundation.org>,
FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>,
Mike Christie <michaelc@...wisc.edu>,
Vu Pham <vuhuong@...lanox.com>,
Bart Van Assche <bart.vanassche@...il.com>,
James Smart <James.Smart@...lex.Com>,
Joe Eykholt <jeykholt@...co.com>, Andy Yan <ayan@...vell.com>,
Chetan Loke <generationgnu@...oo.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Hannes Reinecke <hare@...e.de>,
Richard Sharpe <realrichardsharpe@...il.com>,
Daniel Henrique Debonzi <debonzi@...ux.vnet.ibm.com>
Subject: Re: [PATCH 8/19]: SCST SYSFS interface implementation
Greg KH, on 10/10/2010 01:20 AM wrote:
> On Sat, Oct 02, 2010 at 01:46:21AM +0400, Vladislav Bolkhovitin wrote:
>> This patch contains SYSFS interface implementation.
>
> Nice, but you forgot to document it. All sysfs changes need to be
> documented in Documentation/ABI/
>
> Please add a file to this patch that does so.
I'll do. I didn't know about this. Thanks for pointing on it.
>> +static void scst_tgtt_release(struct kobject *kobj)
>> +{
>> + struct scst_tgt_template *tgtt;
>> +
>> + tgtt = container_of(kobj, struct scst_tgt_template, tgtt_kobj);
>> + complete_all(&tgtt->tgtt_kobj_release_cmpl);
>> + return;
>
> Don't you also need to free the memory of your kobject here?
>
>> +static void scst_tgt_release(struct kobject *kobj)
>> +{
>> + struct scst_tgt *tgt;
>> +
>> + tgt = container_of(kobj, struct scst_tgt, tgt_kobj);
>> + complete_all(&tgt->tgt_kobj_release_cmpl);
>> + return;
>
> Same here, no kfree?
>
>> +static void scst_acg_release(struct kobject *kobj)
>> +{
>> + struct scst_acg *acg;
>> +
>> + acg = container_of(kobj, struct scst_acg, acg_kobj);
>> + complete_all(&acg->acg_kobj_release_cmpl);
>
> And here.
Thanks for the review. In all those functions kobjects for simplicity
are embedded into the outer objects, so they will be freed as part of
the outer objects free. Hence, kfree() for the kobjects in the release
functions are not needed.
Thanks again,
Vlad
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists