From 9378ee00ac7381618cd18e8737d89bd6cec67261 Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Sun, 24 Nov 2024 00:23:02 +0100 Subject: [PATCH] Revert "nfsd: fix delegation_blocked() to block correctly for at least 30 seconds" This reverts commit 2f271f85916ef24a5cd4300a33ca177253b48fe4. --- fs/nfsd/nfs4state.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 5d71214d9..d2bed9a34 100755 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -1090,8 +1090,7 @@ static void nfs4_free_deleg(struct nfs4_stid *stid) * When a delegation is recalled, the filehandle is stored in the "new" * filter. * Every 30 seconds we swap the filters and clear the "new" one, - * unless both are empty of course. This results in delegations for a - * given filehandle being blocked for between 30 and 60 seconds. + * unless both are empty of course. * * Each filter is 256 bits. We hash the filehandle to 32bit and use the * low 3 bytes as hash-table indices. @@ -1120,9 +1119,9 @@ static int delegation_blocked(struct knfsd_fh *fh) if (ktime_get_seconds() - bd->swap_time > 30) { bd->entries -= bd->old_entries; bd->old_entries = bd->entries; - bd->new = 1-bd->new; memset(bd->set[bd->new], 0, sizeof(bd->set[0])); + bd->new = 1-bd->new; bd->swap_time = ktime_get_seconds(); } spin_unlock(&blocked_delegations_lock);