svc: don't hold reference for poolstats, only mutex.
A future patch will remove refcounting on svc_serv as it is of little use. It is currently used to keep the svc around while the pool_stats file is open. Change this to get the pointer, protected by the mutex, only in seq_start, and the release the mutex in seq_stop. This means that if the nfsd server is stopped and restarted while the pool_stats file it open, then some pool stats info could be from the first instance and some from the second. This might appear odd, but is unlikely to be a problem in practice. Signed-off-by:NeilBrown <neilb@suse.de> Reviewed-by:
Jeff Layton <jlayton@kernel.org> Signed-off-by:
Chuck Lever <chuck.lever@oracle.com>
Showing
- fs/nfsd/netns.h 3 additions, 1 deletionfs/nfsd/netns.h
- fs/nfsd/nfsctl.c 1 addition, 1 deletionfs/nfsd/nfsctl.c
- fs/nfsd/nfssvc.c 2 additions, 22 deletionsfs/nfsd/nfssvc.c
- include/linux/sunrpc/svc.h 7 additions, 1 deletioninclude/linux/sunrpc/svc.h
- net/sunrpc/svc_xprt.c 23 additions, 9 deletionsnet/sunrpc/svc_xprt.c
Please register or sign in to comment