On Sat, 2025-06-21 at 11:21 -0400, Chuck Lever wrote: > On 6/20/25 7:33 PM, NeilBrown wrote: > > The first patch hopefully fixes a bug with locking as reported by Li > > Lingfeng: some write_foo functions aren't locked properly. > > > > The other two improve the locking code, particulary so that we don't > > need a global mutex to change per-netns data. > > > > I've revised the locking to use guard(mutex) for (almost) all places > > that the per-netfs mutex is used. I think this is an improvement but > > would like to know what others think. > > > > I haven't changed _get/_put to _pin/_unpin as Chuck wondered about. I'm > > not against that (though get/put are widely understood) but nor am I > > particularly for it yet. Again, opinions are welcome. > > I think of get and put as operations you do on an object. Saying > > nfsd_startup_get(); > > seems a little strange to me. As I said before, it seems like you > are protecting a critical section, not a particular object. > I think of it as taking a reference to the service being up and running. Maybe nfsd_service_get/put() ? -- Jeff Layton <jlayton@xxxxxxxxxx>