summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuangshuo Li <lgs201920130244@gmail.com>2026-07-05 00:42:17 +0800
committerTrond Myklebust <trond.myklebust@hammerspace.com>2026-08-17 09:02:07 -0700
commit68c03755577ac90e31e38c7ec787301cf6be5331 (patch)
treef4353e22b8b58c812686237d7f5d85b13dc37c81
parent3265f1998ae9a9282a8a6ca95467d9572d6ebb82 (diff)
NFS: Fix delayed delegation return list handling
The delayed delegation return handling added a separate delegations_delayed list to keep delegations whose return needs to be retried later. The delayed list is then spliced back to delegations_return by nfs_server_clear_delayed_delegations(), which also causes the state manager to retry the delegation return. However, nfs_end_delegation_return() still moves delayed delegations to delegations_return instead of delegations_delayed. As a result, the new delayed list is never populated, nfs_server_clear_delayed_delegations() always returns false, and NFS4CLNT_DELEGRETURN is not set again to drive a retry. Move delayed delegations to delegations_delayed so that the delayed return path can splice them back to delegations_return and schedule the retry as intended. Fixes: 4039fbedcbcb ("NFS: fix delayed delegation return handling") Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
-rw-r--r--fs/nfs/delegation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 284437fa3f87..ab3e441464a6 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -604,7 +604,7 @@ delay:
spin_lock(&server->delegations_lock);
if (list_empty(&delegation->entry))
refcount_inc(&delegation->refcount);
- list_move_tail(&delegation->entry, &server->delegations_return);
+ list_move_tail(&delegation->entry, &server->delegations_delayed);
spin_unlock(&server->delegations_lock);
set_bit(NFS4CLNT_DELEGRETURN_DELAYED, &server->nfs_client->cl_state);
abort: