]> git.baikalelectronics.ru Git - kernel.git/commit
loop: Fix missing discard support when using LOOP_CONFIGURE
authorKristian Klausen <kristian@klausen.dk>
Fri, 18 Jun 2021 11:51:57 +0000 (13:51 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 18 Jun 2021 14:52:37 +0000 (08:52 -0600)
commitda9b7189e8e77a3dc55127e18dfc94189c739769
tree5270a0e577ef4253faa0c986af3dea48f56e500f
parentaa0eddb7a91c3ef712dff18cc9817d2cd74273cd
loop: Fix missing discard support when using LOOP_CONFIGURE

Without calling loop_config_discard() the discard flag and parameters
aren't set/updated for the loop device and worst-case they could
indicate discard support when it isn't the case (ex: if the
LOOP_SET_STATUS ioctl was used with a different file prior to
LOOP_CONFIGURE).

Cc: <stable@vger.kernel.org> # 5.8.x-
Fixes: 7f8999d85985 ("loop: Add LOOP_CONFIGURE ioctl")
Signed-off-by: Kristian Klausen <kristian@klausen.dk>
Link: https://lore.kernel.org/r/20210618115157.31452-1-kristian@klausen.dk
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c