mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
UPSTREAM: 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: 3448914e8cc5 ("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>
(cherry picked from commit 2b9ac22b12a266eb4fec246a07b504dd4983b16b)
Bug: 187129171
Signed-off-by: Connor O'Brien <connoro@google.com>
Change-Id: I5dca23cbb70d4951101589efb5384444e443817f
This commit is contained in:
parent
d0cca8a1ea
commit
8557d5a891
1 changed files with 1 additions and 0 deletions
|
|
@ -1161,6 +1161,7 @@ static int loop_configure(struct loop_device *lo, fmode_t mode,
|
|||
blk_queue_physical_block_size(lo->lo_queue, bsize);
|
||||
blk_queue_io_min(lo->lo_queue, bsize);
|
||||
|
||||
loop_config_discard(lo);
|
||||
loop_update_rotational(lo);
|
||||
loop_update_dio(lo);
|
||||
loop_sysfs_init(lo);
|
||||
|
|
|
|||
Loading…
Reference in a new issue