diff mbox series

[v6,3/7] nfsd: always release slot when requeueing callback

Message ID 20250209-nfsd-6-14-v6-3-396dd1bed647@kernel.org (mailing list archive)
State In Next
Delegated to: Chuck Lever
Headers show
Series nfsd: CB_SEQUENCE error handling fixes and cleanups | expand

Commit Message

Jeff Layton Feb. 9, 2025, 12:31 p.m. UTC
If the callback is going to be requeued to the workqueue, then release
the slot. The callback client and session could change and the slot may
no longer be valid after that point.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/nfsd/nfs4callback.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index f983d2879bd3fe4c5aa2b0381f968fac753d79dc..7596d0f7dcad44f462ca483979b9c9138ab5dbaf 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -1405,6 +1405,7 @@  static bool nfsd4_cb_sequence_done(struct rpc_task *task, struct nfsd4_callback
 	rpc_restart_call_prepare(task);
 	goto out;
 requeue:
+	nfsd41_cb_release_slot(cb);
 	nfsd4_requeue_cb(task, cb);
 	return false;
 }