linux/fs/nfsd
Mike Snitzer 47e988147f nfsd: add nfsd_serv_try_get and nfsd_serv_put
Introduce nfsd_serv_try_get and nfsd_serv_put and update the nfsd code
to prevent nfsd_destroy_serv from destroying nn->nfsd_serv until any
caller of nfsd_serv_try_get releases their reference using nfsd_serv_put.

A percpu_ref is used to implement the interlock between
nfsd_destroy_serv and any caller of nfsd_serv_try_get.

This interlock is needed to properly wait for the completion of client
initiated localio calls to nfsd (that are _not_ in the context of nfsd).

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
2024-09-23 15:03:30 -04:00
..
acl.h
auth.c nfsd: Pass 'cred' instead of 'rqstp' to some functions. 2024-09-20 19:31:03 -04:00
auth.h nfsd: Pass 'cred' instead of 'rqstp' to some functions. 2024-09-20 19:31:03 -04:00
blocklayout.c NFSD: Annotate struct pnfs_block_deviceaddr with __counted_by() 2024-09-20 19:31:03 -04:00
blocklayoutxdr.c
blocklayoutxdr.h NFSD: Annotate struct pnfs_block_deviceaddr with __counted_by() 2024-09-20 19:31:03 -04:00
cache.h nfsd: don't allocate the versions array. 2024-09-20 19:29:23 -04:00
current_stateid.h
export.c NFSD: Handle @rqstp == NULL in check_nfsd_access() 2024-09-23 15:03:29 -04:00
export.h nfsd: Pass 'cred' instead of 'rqstp' to some functions. 2024-09-20 19:31:03 -04:00
filecache.c nfsd: add nfsd_file_acquire_local() 2024-09-23 15:03:30 -04:00
filecache.h nfsd: add nfsd_file_acquire_local() 2024-09-23 15:03:30 -04:00
flexfilelayout.c
flexfilelayoutxdr.c
flexfilelayoutxdr.h
idmap.h
Kconfig nfs_common: factor out nfs_errtbl and nfs_stat_to_errno 2024-09-23 15:03:29 -04:00
lockd.c
Makefile
netlink.c nfsd: new netlink ops to get/set server pool_mode 2024-07-08 14:10:05 -04:00
netlink.h nfsd: new netlink ops to get/set server pool_mode 2024-07-08 14:10:05 -04:00
netns.h nfsd: add nfsd_serv_try_get and nfsd_serv_put 2024-09-23 15:03:30 -04:00
nfs2acl.c NFSD: remove unused structs 'nfsd3_voidargs' 2024-07-08 14:10:01 -04:00
nfs3acl.c NFSD: remove unused structs 'nfsd3_voidargs' 2024-07-08 14:10:01 -04:00
nfs3proc.c nfsd: move error choice for incorrect object types to version-specific code. 2024-09-20 19:31:03 -04:00
nfs3xdr.c nfsd: Fix NFSv3 atomicity bugs in nfsd_setattr() 2024-03-01 09:12:33 -05:00
nfs4acl.c
nfs4callback.c nfsd: add more nfsd_cb tracepoints 2024-09-20 19:31:03 -04:00
nfs4idmap.c nfsd: call cache_put if xdr_reserve_space returns NULL 2024-09-20 19:31:03 -04:00
nfs4layouts.c nfsd: track the main opcode for callbacks 2024-09-20 19:31:03 -04:00
nfs4proc.c NFSD: Wrap async copy operations with trace points 2024-09-20 19:31:03 -04:00
nfs4recover.c nfsd: enforce upper limit for namelen in __cld_pipe_inprogress_downcall() 2024-09-20 19:31:35 -04:00
nfs4state.c nfsd: fix delegation_blocked() to block correctly for at least 30 seconds 2024-09-20 19:31:38 -04:00
nfs4xdr.c NFSD: Fix NFSv4's PUTPUBFH operation 2024-09-20 19:31:03 -04:00
nfscache.c nfsd: Simplify the allocation of slab caches in nfsd_drc_slab_create 2024-03-01 09:12:24 -05:00
nfsctl.c sunrpc: change sp_nrthreads from atomic_t to unsigned int. 2024-09-20 19:31:03 -04:00
nfsd.h nfsd: move error choice for incorrect object types to version-specific code. 2024-09-20 19:31:03 -04:00
nfsfh.c nfsd: add nfsd_file_acquire_local() 2024-09-23 15:03:30 -04:00
nfsfh.h nfsd: add nfsd_file_acquire_local() 2024-09-23 15:03:30 -04:00
nfsproc.c nfsd: move error choice for incorrect object types to version-specific code. 2024-09-20 19:31:03 -04:00
nfssvc.c nfsd: add nfsd_serv_try_get and nfsd_serv_put 2024-09-23 15:03:30 -04:00
nfsxdr.c
pnfs.h nfsd: allow layout state to be admin-revoked. 2024-03-01 09:12:22 -05:00
state.h nfsd: track the main opcode for callbacks 2024-09-20 19:31:03 -04:00
stats.c fs: nfsd: use group allocation/free of per-cpu counters API 2024-05-06 09:07:17 -04:00
stats.h fs: nfsd: use group allocation/free of per-cpu counters API 2024-05-06 09:07:17 -04:00
trace.c
trace.h NFSD: Short-circuit fh_verify tracepoints for LOCALIO 2024-09-23 15:03:30 -04:00
vfs.c nfsd: map the EBADMSG to nfserr_io to avoid warning 2024-09-20 19:31:03 -04:00
vfs.h nfsd: Pass 'cred' instead of 'rqstp' to some functions. 2024-09-20 19:31:03 -04:00
xdr3.h nfsd: Fix NFSv3 atomicity bugs in nfsd_setattr() 2024-03-01 09:12:33 -05:00
xdr4.h NFSD: Limit the number of concurrent async COPY operations 2024-09-20 19:31:03 -04:00
xdr4cb.h NFSD: add support for CB_GETATTR callback 2024-03-01 09:12:31 -05:00
xdr.h