mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
block: Drop granularity check in queue_limit_discard_alignment()
lim->discard_granularity is always at least SECTOR_SIZE, so drop the pointless check for granularity less than SECTOR_SIZE. Signed-off-by: John Garry <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
1 parent
b49125574c
commit
e924da7d66
1 file changed
-2
@@ -465,8 +465,6 @@ static unsigned int queue_limit_discard_alignment(
|
||||
/* Why are these in bytes, not sectors? */
|
||||
alignment = lim->discard_alignment >> SECTOR_SHIFT;
|
||||
granularity = lim->discard_granularity >> SECTOR_SHIFT;
|
||||
if (!granularity)
|
||||
return 0;
|
||||
|
||||
/* Offset of the partition start in 'granularity' sectors */
|
||||
offset = sector_div(sector, granularity);
|
||||
|
||||
Reference in new issue
Block a user