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