linux-stable/drivers/block
Jakob Koschel 39bdc65bb7 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 08:41:18 +02:00
..
aoe
drbd drbd: remove usage of list iterator variable after loop 2022-05-25 08:41:18 +02:00
mtip32xx
paride
rsxx block: rsxx: fix error return code of rsxx_pci_probe() 2021-03-17 16:34:34 +01:00
xen-blkback xen-blkback: don't leak persistent grants from xen_blkbk_map() 2021-03-30 14:40:13 +02:00
zram zsmalloc: account the number of compacted pages correctly 2021-03-07 11:27:46 +01:00
amiflop.c amiflop: clean up on errors during setup 2019-12-01 09:13:26 +01:00
ataflop.c
brd.c block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h> 2020-09-09 19:03:12 +02:00
cryptoloop.c cryptoloop: add a deprecation warning 2021-09-22 11:45:15 +02:00
DAC960.c
DAC960.h
floppy.c floppy: use a statically allocated error counter 2022-05-25 08:41:18 +02:00
Kconfig floppy: disable FDRAWCMD by default 2022-05-12 12:17:04 +02:00
loop.c loop: use sysfs_emit() in the sysfs xxx show() 2022-04-20 09:08:21 +02:00
loop.h Revert "block/loop: Use global lock for ioctl() operation." 2019-05-02 09:40:33 +02:00
Makefile
nbd.c nbd: freeze the queue while we're adding connections 2021-02-03 23:22:20 +01:00
null_blk.c block: Move SECTOR_SIZE and SECTOR_SHIFT definitions into <linux/blkdev.h> 2020-09-09 19:03:12 +02:00
pktcdvd.c pktcdvd: remove warning on attempting to register non-passthrough dev 2019-10-07 18:55:13 +02:00
ps3disk.c ps3disk: use the default segment boundary 2020-06-25 15:41:49 +02:00
ps3vram.c
rbd.c rbd: require global CAP_SYS_ADMIN for mapping and unmapping 2020-09-23 10:46:30 +02:00
rbd_types.h
skd_main.c skd: fixup usage of legacy IO API 2019-12-01 09:13:20 +01:00
skd_s1120.h
smart1,2.h
sunvdc.c sunvdc: Do not spin in an infinite loop when vio_ldc_send() returns EAGAIN 2019-02-12 19:46:00 +01:00
swim.c
swim3.c block/swim3: Fix -EBUSY error when re-opening device after unmount 2019-02-12 19:46:09 +01:00
swim_asm.S
sx8.c
umem.c
umem.h
virtio_blk.c virtio-blk: Use blk_validate_block_size() to validate block size 2022-04-20 09:08:08 +02:00
xen-blkfront.c xen/blkfront: don't use gnttab_query_foreign_access() for mapped status 2022-03-11 10:13:32 +01:00
xsysace.c xsysace: Fix error handling in ace_setup 2019-05-08 07:20:51 +02:00
z2ram.c