]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
NFSD: fix hang in nfsd4_shutdown_callback
authorDai Ngo <dai.ngo@oracle.com>
Thu, 30 Jan 2025 19:01:27 +0000 (11:01 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:56 +0000 (13:49 +0100)
commit38d345f612503b850c2973e5a879f88e441b34d7
tree5df2e2202f5380b7a297cf1502af0e7fd28476d0
parent2e59b2b68782519560b3d6a41dd66a3d01a01cd3
NFSD: fix hang in nfsd4_shutdown_callback

commit 036ac2778f7b28885814c6fbc07e156ad1624d03 upstream.

If nfs4_client is in courtesy state then there is no point to send
the callback. This causes nfsd4_shutdown_callback to hang since
cl_cb_inflight is not 0. This hang lasts about 15 minutes until TCP
notifies NFSD that the connection was dropped.

This patch modifies nfsd4_run_cb_work to skip the RPC call if
nfs4_client is in courtesy state.

Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Fixes: 66af25799940 ("NFSD: add courteous server support for thread with only delegation")
Cc: stable@vger.kernel.org
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs4callback.c