lockd: fix nlm_close_files
authorJeff Layton <jlayton@kernel.org>
Mon, 11 Jul 2022 18:30:14 +0000 (14:30 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:24 +0000 (21:24 +0200)
commit62a6a708f3922e08908292bab29c83323ed5f0b4
treed651becb21b7e3134dc56e1195d5c1c581ccad57
parent9c3eef773cf4a8a18f959234bbb4c0a55c31ab71
lockd: fix nlm_close_files

[ Upstream commit 1197eb5906a5464dbaea24cac296dfc38499cc00 ]

This loop condition tries a bit too hard to be clever. Just test for
the two indices we care about explicitly.

Cc: J. Bruce Fields <bfields@fieldses.org>
Fixes: 7f024fcd5c97 ("Keep read and write fds with each nlm_file")
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/lockd/svcsubs.c