On Thu, 2009-10-29 at 19:58 +0200, Boaz Harrosh wrote: > 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. You can't even justify this on OO grounds: In OO code, you get this override by extending the object not hijacking the method and arbitrarily linking two separate objects. Embedding the device is the C equivalent of the OO object extension. Method hijacks are almost always wrong. James -- 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