]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
nfsd: use correct loop termination in nfsd4_revoke_states()
authorNeilBrown <neil@brown.name>
Sun, 14 Dec 2025 21:07:28 +0000 (08:07 +1100)
committerChuck Lever <chuck.lever@oracle.com>
Fri, 2 Jan 2026 18:49:38 +0000 (13:49 -0500)
commitfb321998de7639f1954430674475e469fb529d9c
tree1c4aa4e6a2311a2ecf9d944e059b7e1d88235fae
parent2857bd59feb63fcf40fe4baf55401baea6b4feb4
nfsd: use correct loop termination in nfsd4_revoke_states()

The loop in nfsd4_revoke_states() stops one too early because
the end value given is CLIENT_HASH_MASK where it should be
CLIENT_HASH_SIZE.

This means that an admin request to drop all locks for a filesystem will
miss locks held by clients which hash to the maximum possible hash value.

Fixes: 1ac3629bf012 ("nfsd: prepare for supporting admin-revocation of state")
Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neil@brown.name>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4state.c