Revert "nfsd: fix delegation_blocked() to block correctly for at least 30 seconds"
This reverts commit 2f271f8591
.
This commit is contained in:
parent
ab71c81dd8
commit
9378ee00ac
1 changed files with 2 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue