diff options
| author | Christoph Hellwig <[email protected]> | 2025-07-31 15:22:28 +0000 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2025-07-31 21:01:35 +0000 |
| commit | fad6551fcf537375702b9af012508156a16a1ff7 (patch) | |
| tree | 7efc2aacb38c41f020b4c99e759e66e2f0a84f5e /lib/timerqueue.c | |
| parent | zloop: fix KASAN use-after-free of tag set (diff) | |
| download | kernel-fad6551fcf537375702b9af012508156a16a1ff7.tar.gz kernel-fad6551fcf537375702b9af012508156a16a1ff7.zip | |
block: ensure discard_granularity is zero when discard is not supported
Documentation/ABI/stable/sysfs-block states:
What: /sys/block/<disk>/queue/discard_granularity
[...]
A discard_granularity of 0 means that the device does not support
discard functionality.
but this got broken when sorting out the block limits updates. Fix this
by setting the discard_granularity limit to zero when the combined
max_discard_sectors is zero.
Fixes: 3c407dc723bb ("block: default the discard granularity to sector size")
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Martin K. Petersen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions
