[openib-general] Re: RE: Re: [PATCH] ipoib_flush_paths

Muli Ben-Yehuda mulix at mulix.org
Thu Apr 6 07:05:27 PDT 2006


On Thu, Apr 06, 2006 at 05:04:07PM +0300, Michael S. Tsirkin wrote:

> struct query {
> 	void (*callback)();
> 	struct module *owner;
> }
> 
> Then it is always safe to do
> 
> 	__get_module(query->owner);
> 	query->callback();
> 	put_module(query->owner);

Ok, that makes sense. By the way, shouldn't __get_module be
try_module_get(), with proper error handling if it fails?

Cheers,
Muli
-- 
Muli Ben-Yehuda
http://www.mulix.org | http://mulix.livejournal.com/




More information about the general mailing list