On Thu, 29 Aug 2024, Mike Snitzer wrote: > + > +bool nfs_uuid_is_local(const uuid_t *uuid, struct net *net, struct auth_domain *dom) > +{ > + bool is_local = false; > + nfs_uuid_t *nfs_uuid; > + > + rcu_read_lock(); > + nfs_uuid = nfs_uuid_lookup(uuid); > + if (nfs_uuid) { > + nfs_uuid->net = maybe_get_net(net); I know I said it looked wrong to be getting a ref for the domain but not the net - and it did. But that doesn't mean the fix was to get a ref for the net and to hold it indefinitely. This ref is now held until the client happens to notice that localio doesn't work any more (because nfsd_serv_try_get() fails). So the shutdown of a net namespace will be delayed indefinitely if the NFS filesystem isn't being actively used. I would prefer that there were a way for the net namespace to reach back into the client and disconnect itself. Probably this would be a linked-list in struct nfsd_net which linked list_heads in struct nfs_client. This list would need to be protected by a spinlock - probably global in nfs_common so client could remove itself and server could remove all clients after clearing their net pointers. It is probably best if I explain all of what I am thinking as a patch. Stay tuned. NeilBrown