mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
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: 4039fbedcb ("NFS: fix delayed delegation return handling")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
3265f1998a
commit
68c0375557
|
|
@ -604,7 +604,7 @@ static int nfs_end_delegation_return(struct inode *inode,
|
|||
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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user