VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Christoph Hellwig <hch@lst.de> 2021-01-25 19:39:57 +0100 committer: Jens Axboe <axboe@kernel.dk> 2021-01-25 11:41:34 -0700 commit: 3a905c37c3510ea6d7cfcdfd0f272ba731286560 parent: c42bca92be928ce7dece5fc04cf68d0e37ee6718
Commit Summary:
block: skip bio_check_eod for partition-remapped bios
Diffstat:
1 file changed, 6 insertions, 5 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 88f608904432..5e752840b41a 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -815,11 +815,12 @@ static noinline_for_stack bool submit_bio_checks(struct bio *bio)
 		goto end_io;
 	if (unlikely(bio_check_ro(bio)))
 		goto end_io;
-	if (unlikely(bio_check_eod(bio)))
-		goto end_io;
-	if (bio->bi_bdev->bd_partno && !bio_flagged(bio, BIO_REMAPPED) &&
-	    unlikely(blk_partition_remap(bio)))
-		goto end_io;
+	if (!bio_flagged(bio, BIO_REMAPPED)) {
+		if (unlikely(bio_check_eod(bio)))
+			goto end_io;
+		if (bdev->bd_partno && unlikely(blk_partition_remap(bio)))
+			goto end_io;
+	}
 
 	/*
 	 * Filter flush bio's early so that bio based drivers without flush