Skip to content
Snippets Groups Projects
Commit 79e5dc59 authored by Martijn Coenen's avatar Martijn Coenen Committed by Jens Axboe
Browse files

loop: Set correct device size when using LOOP_CONFIGURE


The device size calculation was done before processing the loop
configuration, which meant that the we set the size on the underlying
block device incorrectly in case lo_offset/lo_sizelimit were set in the
configuration. Delay computing the size until we've setup the device
parameters correctly.

Fixes: 3448914e("loop: Add LOOP_CONFIGURE ioctl")
Reported-by: default avatarLennart Poettering <mzxreary@0pointer.de>
Tested-by: default avatarYang Xu <xuyang2018.jy@cn.fujitsu.com>
Signed-off-by: default avatarMartijn Coenen <maco@android.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent acb19e17
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment