]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
nfsd: cancel async COPY operations when admin revokes filesystem state
authorChuck Lever <chuck.lever@oracle.com>
Thu, 8 Jan 2026 00:40:11 +0000 (19:40 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Wed, 28 Jan 2026 15:15:42 +0000 (10:15 -0500)
commit3daab3112f039cf849f96764019b096bb0a39d04
tree92d5bdcf9f954c3110677a555243cda8215dfc39
parentd8316b837c2ca5f92e781fa1575095c0132ae3c1
nfsd: cancel async COPY operations when admin revokes filesystem state

Async COPY operations hold copy stateids that represent NFSv4 state.
Thus, when the NFS server administrator revokes all NFSv4 state for
a filesystem via the unlock_fs interface, ongoing async COPY
operations referencing that filesystem must also be canceled.

Each cancelled copy triggers a CB_OFFLOAD callback carrying the
NFS4ERR_ADMIN_REVOKED status to notify the client that the server
terminated the operation.

The static drop_client() function is renamed to nfsd4_put_client()
and exported. The function must be exported because both the new
nfsd4_cancel_copy_by_sb() and the CB_OFFLOAD release callback in
nfs4proc.c need to release client references.

Reviewed-by: NeilBrown <neil@brown.name>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4proc.c
fs/nfsd/nfs4state.c
fs/nfsd/nfsctl.c
fs/nfsd/state.h
fs/nfsd/xdr4.h