]> git.apps.os.sepia.ceph.com Git - ceph-client.git/commit
ceph: use dedicated list iterator variable
authorJakob Koschel <jakobkoschel@gmail.com>
Thu, 31 Mar 2022 21:53:28 +0000 (23:53 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 25 Apr 2022 09:07:47 +0000 (11:07 +0200)
commitbbea493758082c98a839ab8d38578db6fe7c7daf
tree64209272ba09f7ba810dd96def357a9044a6b244
parent2bc5e7ea1cc728975296cdc4020131bb5172c6a0
ceph: use 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 [1].

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: Jeff Layton <jlayton@kernel.org>
fs/ceph/caps.c