Skip to content

Commit d0a2b52

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: tone down bio_check_eod
bdev_nr_sectors() == 0 is a pattern used for block devices that have been hot removed, don't spam the log about them. Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 47b71ab commit d0a2b52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ static inline int bio_check_eod(struct bio *bio)
557557
sector_t maxsector = bdev_nr_sectors(bio->bi_bdev);
558558
unsigned int nr_sectors = bio_sectors(bio);
559559

560-
if (nr_sectors &&
560+
if (nr_sectors && maxsector &&
561561
(nr_sectors > maxsector ||
562562
bio->bi_iter.bi_sector > maxsector - nr_sectors)) {
563563
pr_info_ratelimited("%s: attempt to access beyond end of device\n"

0 commit comments

Comments
 (0)