aboutsummaryrefslogtreecommitdiff
path: root/block/blk-lib.c
diff options
context:
space:
mode:
authorChristoph Hellwig2024-05-06 06:20:22 +0200
committerJens Axboe2024-05-07 07:29:42 -0600
commit0942592045782e76a9d52c409955c2dc313cbd30 (patch)
treeedad23808ef13a097abb802fc1ac3c620d9563b7 /block/blk-lib.c
parentccb326b5f9e623eb7f130fbbf2505ec0e2dcaff9 (diff)
block: remove the discard_granularity check in __blkdev_issue_discard
We now set a default granularity in the queue limits API, so don't bother with this extra check. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20240506042027.2289826-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-lib.c')
-rw-r--r--block/blk-lib.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/block/blk-lib.c b/block/blk-lib.c
index a6954eafb8c8..7ec3e170e7f6 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -46,13 +46,6 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
if (!bdev_max_discard_sectors(bdev))
return -EOPNOTSUPP;
- /* In case the discard granularity isn't set by buggy device driver */
- if (WARN_ON_ONCE(!bdev_discard_granularity(bdev))) {
- pr_err_ratelimited("%pg: Error: discard_granularity is 0.\n",
- bdev);
- return -EOPNOTSUPP;
- }
-
bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1;
if ((sector | nr_sects) & bs_mask)
return -EINVAL;