android_kernel_motorola_sm6375/drivers/block
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Martijn Coenen 7423a124fa loop: Refactor loop_set_status() size calculation
[ Upstream commit b0bd158dd630bd47640e0e418c062cda1e0da5ad ]

figure_loop_size() calculates the loop size based on the passed in
parameters, but at the same time it updates the offset and sizelimit
parameters in the loop device configuration. That is a somewhat
unexpected side effect of a function with this name, and it is only only
needed by one of the two callers of this function - loop_set_status().

Move the lo_offset and lo_sizelimit assignment back into loop_set_status(),
and use the newly factored out functions to validate and apply the newly
calculated size. This allows us to get rid of figure_loop_size() in a
follow-up commit.

Signed-off-by: Martijn Coenen <maco@android.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Genjian Zhang <zhanggenjian@kylinos.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-13 12:51:30 +02:00
..
aoe aoe: fix the potential use-after-free problem in aoecmd_cfg_pkts 2024-03-26 18:22:13 -04:00
drbd treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
mtip32xx
paride
rsxx
xen-blkback
zram
amiflop.c
ataflop.c
brd.c
cryptoloop.c
floppy.c
Kconfig remove the sx8 block driver 2023-11-08 11:23:42 +01:00
loop.c loop: Refactor loop_set_status() size calculation 2024-04-13 12:51:30 +02:00
loop.h
Makefile remove the sx8 block driver 2023-11-08 11:23:42 +01:00
nbd.c nbd: null check for nla_nest_start 2024-03-26 18:22:13 -04:00
null_blk.h
null_blk_main.c
null_blk_zoned.c
pktcdvd.c
ps3disk.c
ps3vram.c
rbd.c rbd: don't move requests to the running list on errors 2024-02-23 08:24:52 +01:00
rbd_types.h
skd_main.c
skd_s1120.h
sunvdc.c
swim.c
swim3.c
swim_asm.S
umem.c
umem.h
virtio_blk.c virtio-blk: Ensure no requests in virtqueues before deleting vqs. 2024-03-01 13:13:34 +01:00
xen-blkfront.c xen/blkfront: Only check REQ_FUA for writes 2023-06-21 15:44:09 +02:00
xsysace.c
z2ram.c