On Thu, Sep 25, 2008 at 04:27:01PM -0400, Trond Myklebust wrote: > On Thu, 2008-09-25 at 16:00 -0400, J. Bruce Fields wrote: > > > >> Another fix would be to add a refcount to the rpc_program structure... > > > > > > > > ... a refcount seems more straightforward. Benny, what do you think? > > > > > > I agree. I'll send a patch hopefully tomorrow. > > > Would you like that combined with the one I sent or as a separate one? > > > (I'm inclined towards the latter). > > > > That'd be fine. > > So, looking at what you're trying to do, I'm still having trouble > figuring out why you think you need a dynamically allocated rpc_program > in the first place. > > If the only thing you are trying to support is dynamically allocated > program numbers, then note that rpc_encode_header() doesn't use > program->number at all. Instead, it uses clnt->cl_prog and > clnt->cl_vers. Nothing stops you from setting those values explicitly... Oh, sure, that sounds like an excellent plan--thanks! There's still, as far as I can tell, the small risk of a race on module unload. I don't think we've seen it, and I don't know if it's worth much effort at this point. --b. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html