Skip to content

Commit ff760a8

Browse files
Christoph Hellwigaxboe
authored andcommitted
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 <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 73a768d commit ff760a8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

block/blk-lib.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,6 @@ int __blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
209209
unsigned flags)
210210
{
211211
int ret;
212-
sector_t bs_mask;
213-
214-
bs_mask = (bdev_logical_block_size(bdev) >> 9) - 1;
215-
if ((sector | nr_sects) & bs_mask)
216-
return -EINVAL;
217212

218213
ret = __blkdev_issue_write_zeroes(bdev, sector, nr_sects, gfp_mask,
219214
biop, flags);

0 commit comments

Comments
 (0)