> > > I thought that having release methods that just called kfree() were
> > > also verboten?
> > We do a kmalloc(sizeof(struce device),...) somewhere and this 
> > is how we get rid of it again.
> > How are we supposed to free this object otherwise? The release
> > function gets called when there is no more reference to this
> > object and that's the earliest point we may free it.
> Right, but we've said before this is the wrong way to do it.

I think I missed something. What Greg objected to was that we had used
kfree as the release function. Also he objected to the point that we
were using the pointer to the struct device, which gets passed to the
release function, to free different (larger) objects by using the simple
hack to place the struct device at the beginning of other structs.
This patch does nothing like this. Actually it cleans just all those
things and leftovers up.

> Originally this generic device was part of your adapter structure.  Now
> you're trying to separate it and causing these problems.  What it's

Could you please elaborate where this patch does cause a problem?

> apparently telling us is that you have some problem with the object
> lifetime rules in your code.
> Why should this generic_services device have different lifetime rules
> from the object in which it used to reside?

It doesn't. And this was not supposed to fix anything. It's just that
Andreas liked the code better with allocating the generic_services
struct device seperately. Please note that the lifetime of the adapter
device this struct device was embedded into is always longer than the
lifetime of the generic_services device.
Therefore I can't see why you complain about this piece of code.

Since I didn't get an answer to this:
http://marc.theaimsgroup.com/?l=linux-scsi&m=110551973013105&w=2
my assumption was that it's that obvious to everyone else that I'm
wrong that it isn't even worth writing an answer.
Now I follow Greg's rules and still get complaints...

Thanks,
Heiko

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

Reply via email to