rbd: replace usage of found with dedicated list iterator variable
authorJakob Koschel <jakobkoschel@gmail.com>
Thu, 24 Mar 2022 07:20:50 +0000 (08:20 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 25 May 2022 18:45:13 +0000 (20:45 +0200)
commit3302ffd44c3d70e77ad5764d15f5028a6ade540a
tree06e31d992e18d5141d4d93485b381ad3aa0a03a8
parentd7a2dc523085f8b8c60548ceedc696934aefeb0e
rbd: 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.

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>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
drivers/block/rbd.c