linux/drivers/block/drbd
Jakob Koschel 5a19f3c2d3 drbd: remove usage of list iterator variable after loop
[ Upstream commit 901aeda62e ]

In preparation to limit the scope of a list iterator to the list
traversal loop, use a dedicated pointer to iterate through the list [1].

Since that variable should not be used past the loop iteration, a
separate variable is used to 'remember the current location within the
loop'.

To either continue iterating from that position or skip the iteration
(if the previous iteration was complete) list_prepare_entry() is used.

Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=EHreAsk5SqXPwr9Y7k9sA6cWXJ6w@mail.gmail.com/ [1]
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Link: https://lore.kernel.org/r/20220331220349.885126-1-jakobkoschel@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-25 09:17:54 +02:00
..
drbd_actlog.c drbd: remove ->this_bdev 2020-10-05 10:38:33 -06:00
drbd_bitmap.c mm: remove the pgprot argument to __vmalloc 2020-06-02 10:59:11 -07:00
drbd_debugfs.c block: drbd: no need to check return value of debugfs_create functions 2019-06-20 03:28:16 -06:00
drbd_debugfs.h block: drbd: no need to check return value of debugfs_create functions 2019-06-20 03:28:16 -06:00
drbd_int.h drbd: Fix five use after free bugs in get_initial_state 2022-04-13 21:01:06 +02:00
drbd_interval.c augmented rbtree: add new RB_DECLARE_CALLBACKS_MAX macro 2019-09-25 17:51:39 -07:00
drbd_interval.h
drbd_main.c drbd: remove usage of list iterator variable after loop 2022-05-25 09:17:54 +02:00
drbd_nl.c block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit 2022-05-15 20:00:08 +02:00
drbd_nla.c
drbd_nla.h
drbd_proc.c drbd: remove a bogus bdi_rw_congested call 2020-07-08 17:05:53 -06:00
drbd_protocol.h drbd: Replace zero-length array with flexible-array 2020-06-15 23:08:31 -05:00
drbd_receiver.c drbd: remove ->this_bdev 2020-10-05 10:38:33 -06:00
drbd_req.c drbd: fix potential silent data corruption 2022-04-08 14:39:54 +02:00
drbd_req.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 91 2019-05-24 17:37:53 +02:00
drbd_state_change.h drbd: Fix five use after free bugs in get_initial_state 2022-04-13 21:01:06 +02:00
drbd_state.c drbd: Fix five use after free bugs in get_initial_state 2022-04-13 21:01:06 +02:00
drbd_state.h
drbd_strings.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 91 2019-05-24 17:37:53 +02:00
drbd_strings.h
drbd_vli.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 91 2019-05-24 17:37:53 +02:00
drbd_worker.c drbd: remove ->this_bdev 2020-10-05 10:38:33 -06:00
Kconfig Replace HTTP links with HTTPS ones: DRBD driver 2020-07-05 14:16:44 -06:00
Makefile