summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-07-01 18:51:16 +0200
committerJens Axboe <axboe@kernel.dk>2024-07-05 00:53:15 -0600
commitff760a8f0d09f4ba7574ae2ca8be987854f5246d (patch)
tree01003b9bcc95157c088da730cb81a191266b8f25 /block
parent73a768d5f95533574bb8ace34eb683a88c40509e (diff)
downloadlwn-ff760a8f0d09f4ba7574ae2ca8be987854f5246d.tar.gz
lwn-ff760a8f0d09f4ba7574ae2ca8be987854f5246d.zip
block: remove the LBA alignment check in __blkdev_issue_zeroout
__blkdev_issue_zeroout is a purely kernel internal API and thus can rely on the block layer sector alignment checks. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20240701165219.1571322-7-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-lib.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/block/blk-lib.c b/block/blk-lib.c
index 297bcf689693..601a122af858 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -209,11 +209,6 @@ int __blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
unsigned flags)
{
int ret;
- sector_t bs_mask;
-
- bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1;
- if ((sector | nr_sects) & bs_mask)
- return -EINVAL;
ret = __blkdev_issue_write_zeroes(bdev, sector, nr_sects, gfp_mask,
biop, flags);