aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2026-01-07 08:27:03 +0100
committerAnna Schumaker <anna.schumaker@oracle.com>2026-01-20 14:49:46 -0500
commit2d80e59f29d8cd14230899dfe9c462b710521a85 (patch)
treed1851a159d0565bc564a49040b462e7949be51a5 /fs
parent20151c11364ec9e0110413e7098593bf7c1db83f (diff)
NFS: rewrite nfs_delegations_present in terms of nr_active_delegations
Renewal only cares for active delegations and not revoked ones. Replace the list empty check with reading the active delegation counter to implement this. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'fs')
-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 f56b1d29650a..8e5cb8fc3f32 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -1453,7 +1453,7 @@ int nfs_delegations_present(struct nfs_client *clp)
rcu_read_lock();
list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link)
- if (!list_empty(&server->delegations)) {
+ if (atomic_long_read(&server->nr_active_delegations) > 0) {
ret = 1;
break;
}