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

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
..
aoe block: lift setting the readahead size into the block layer 2020-09-24 13:43:39 -06:00
drbd drbd: remove usage of list iterator variable after loop 2022-05-25 09:17:54 +02:00
mtip32xx blk-mq: move failure injection out of blk_mq_complete_request 2020-06-24 09:15:57 -06:00
paride paride/pcd: use bdev_check_media_change 2020-09-10 09:32:31 -06:00
rnbd block/rnbd-clt: Check the return value of the function rtrs_clt_query 2021-05-19 10:13:06 +02:00
rsxx block: rsxx: fix error return code of rsxx_pci_probe() 2021-03-17 17:06:33 +01:00
xen-blkback xen-blkback: fix compatibility bug with single page rings 2021-05-14 09:50:21 +02:00
zram zram: off by one in read_block_state() 2021-11-18 14:04:27 +01:00
amiflop.c amiflop: use bdev_check_media_change 2020-09-10 09:32:30 -06:00
ataflop.c ataflop: use bdev_check_media_change 2020-09-10 09:32:30 -06:00
brd.c bdi: remove BDI_CAP_SYNCHRONOUS_IO 2020-09-24 13:43:39 -06:00
cryptoloop.c cryptoloop: add a deprecation warning 2021-09-08 08:49:01 +02:00
floppy.c floppy: use a statically allocated error counter 2022-05-25 09:17:51 +02:00
Kconfig floppy: disable FDRAWCMD by default 2022-05-09 09:04:56 +02:00
loop.c loop: use sysfs_emit() in the sysfs xxx show() 2022-04-08 14:40:31 +02:00
loop.h
Makefile
nbd.c Revert "block: nbd: add sanity check for first_minor" 2021-09-16 12:51:23 +02:00
null_blk_main.c null_blk: fix command timeout completion handling 2021-04-16 11:43:21 +02:00
null_blk_trace.c
null_blk_trace.h
null_blk_zoned.c drivers/block/null_blk/main: Fix a double free in null_init. 2021-05-14 09:50:28 +02:00
null_blk.h null_blk: fix command timeout completion handling 2021-04-16 11:43:21 +02:00
pktcdvd.c pktcdvd: use blkdev_get_by_dev instead of open coding it 2020-09-23 10:43:19 -06:00
ps3disk.c
ps3vram.c block: move ->make_request_fn to struct block_device_operations 2020-07-01 07:27:24 -06:00
rbd_types.h
rbd.c rbd: always kick acquire on "acquired" and "released" notifications 2021-07-28 14:35:46 +02:00
skd_main.c skd_main: remove unused including <linux/version.h> 2020-10-17 08:11:14 -06:00
skd_s1120.h
sunvdc.c
swim_asm.S
swim.c swim: simplify media change handling 2020-09-10 09:32:30 -06:00
swim3.c swim3: use bdev_check_media_changed 2020-09-10 09:32:31 -06:00
sx8.c
umem.c umem: fix error return code in mm_pci_probe() 2021-03-30 14:31:50 +02:00
umem.h
virtio_blk.c virtio-blk: Use blk_validate_block_size() to validate block size 2022-04-08 14:39:48 +02:00
xen-blkfront.c xen/blkfront: don't use gnttab_query_foreign_access() for mapped status 2022-03-11 12:11:54 +01:00
xsysace.c xsysace: use platform_get_resource() and platform_get_irq_optional() 2020-10-29 08:22:33 -06:00
z2ram.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00