All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] NFSv4: Fix a regression in the handling of CB_RECALL_ANY
@ 2026-09-11 17:46 Trond Myklebust
  2026-09-15  6:38 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Trond Myklebust @ 2026-09-11 17:46 UTC (permalink / raw)
  To: linux-nfs; +Cc: Christoph Hellwig

From: Trond Myklebust <trond.myklebust@hammerspace.com>

When the flag NFS_DELEGATION_RETURN was replaced by the
server->delegations_return list, the test in
nfs_mark_return_if_closed_delegation() was replaced by one that stops
all further marking of delegations for return when closed as soon as the
server->delegations_return list is non-empty, breaking CB_RECALL_ANY
behaviour.

While the intention at the time was probably to check if
delegation->entry was non-empty in order to emulate the effect of the
NFS_DELEGATION_RETURN test, that is no longer an option, since
delegation->entry is also used for the LRU list.

By just removing the offending check altogether, the patch can end up
moving delegations from the server->delegations_delayed list
prematurely, triggering an early retry. However that should be mostly
harmless behaviour.

Fixes: 0ebe655bd033 ("NFS: add a separate delegation return list")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 fs/nfs/delegation.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index ab3e441464a6..ad774316f716 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -934,8 +934,7 @@ nfs_mark_return_if_closed_delegation(struct nfs_server *server,
 {
 	struct inode *inode;
 
-	if (!list_empty_careful(&server->delegations_return) ||
-	    test_bit(NFS_DELEGATION_RETURN_IF_CLOSED, &delegation->flags))
+	if (test_bit(NFS_DELEGATION_RETURN_IF_CLOSED, &delegation->flags))
 		return;
 	spin_lock(&delegation->lock);
 	inode = delegation->inode;
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] NFSv4: Fix a regression in the handling of CB_RECALL_ANY
  2026-09-11 17:46 [PATCH] NFSv4: Fix a regression in the handling of CB_RECALL_ANY Trond Myklebust
@ 2026-09-15  6:38 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2026-09-15  6:38 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-nfs, Christoph Hellwig

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-15  6:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 17:46 [PATCH] NFSv4: Fix a regression in the handling of CB_RECALL_ANY Trond Myklebust
2026-09-15  6:38 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.