dlm: replace usage of found with dedicated list iterator variable
authorJakob Koschel <jakobkoschel@gmail.com>
Wed, 6 Apr 2022 18:05:31 +0000 (14:05 -0400)
committerDavid Teigland <teigland@redhat.com>
Wed, 6 Apr 2022 19:03:14 +0000 (14:03 -0500)
commitdc1acd5c94699389a9ed023e94dd860c846ea1f6
tree899a5eb3825eeb1e273f825e859bb98b218e79f9
parentc490b3afaa579ab238f78c762d703441ccc898bd
dlm: replace usage of found with dedicated list iterator variable

To move the list iterator variable into the list_for_each_entry_*()
macro in the future it should be avoided to use the list iterator
variable after the loop body.

To *never* use the list iterator variable after the loop it was
concluded to use a separate iterator variable instead of a
found boolean [1].

This removes the need to use a found variable and simply checking if
the variable was set, can determine if the break/goto was hit.

Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lock.c
fs/dlm/plock.c
fs/dlm/recover.c