Re: [PATCH 4/5] osduld: Use device->release instead of internal kref

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/29/2009 07:41 PM, James Bottomley wrote:
> 
> Chaining methods like this because of inner knowledge of the
> implementation isn't resilient, it's very fragile.
> 

If I would just kfree, because I know the inner code, that would be
fragile.

But overriding a destructor, do what you need, and call previous
distroctor. Does not take any inner knowledge. Just the published fact
that it is a distructor, which will destroy the object.

> Isn't the correct answer to embed your device in struct osd_uld_device?
> They both look to have identical lifetimes and the release rules can
> then handle the dual destruction?
> 

See the patch. there I have direct manipulation with inner members.
The chaining is more resilient, i think.

> James
> 
> 

Boaz
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux