f2fs: replace usage of found with dedicated list iterator variable
authorJakob Koschel <jakobkoschel@gmail.com>
Tue, 12 Apr 2022 12:20:40 +0000 (14:20 +0200)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 25 Apr 2022 22:13:04 +0000 (15:13 -0700)
commit9e3a845df9ea56387d2a6011299d44ddf21b3322
tree84f73b6e151236c08655f4de02abbbc5686a9dde
parentdf35435d4144ae3a8afeedf45ea43c5cc63a70eb
f2fs: 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>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c