]> git.baikalelectronics.ru Git - kernel.git/commit
loop: unset GENHD_FL_NO_PART_SCAN on LOOP_CONFIGURE
authorLennart Poettering <mzxreary@0pointer.de>
Mon, 10 Aug 2020 17:16:32 +0000 (19:16 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 11 Aug 2020 13:13:06 +0000 (07:13 -0600)
commit991a11b6b9eea3cc288134e0f1d3ee55e38165b8
tree47948ba52a6da02052a7627a2f91b8c37441d7fb
parentfbdafd24c79f987323ea15c434344617366dc17f
loop: unset GENHD_FL_NO_PART_SCAN on LOOP_CONFIGURE

When LOOP_CONFIGURE is used with LO_FLAGS_PARTSCAN we need to propagate
this into the GENHD_FL_NO_PART_SCAN. LOOP_SETSTATUS does this,
LOOP_CONFIGURE doesn't so far. Effect is that setting up a loopback
device with partition scanning doesn't actually work when LOOP_CONFIGURE
is issued, though it works fine with LOOP_SETSTATUS.

Let's correct that and propagate the flag in LOOP_CONFIGURE too.

Fixes: 7f8999d85985("loop: Add LOOP_CONFIGURE ioctl")
Signed-off-by: Lennart Poettering <lennart@poettering.net>
Acked-by: Martijn Coenen <maco@android.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c