VisionFive2 Linux kernel

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

More than 9999 Commits   32 Branches   54 Tags
author: Yufen Yu <yuyufen@huawei.com> 2021-03-31 07:53:59 -0400 committer: Jens Axboe <axboe@kernel.dk> 2021-03-31 19:18:04 -0600 commit: 3edf5346e4f2ce2fa0c94651a90a8dda169565ee parent: e82fc7855749aa197740a60ef22c492c41ea5d5f
Commit Summary:
block: only update parent bi_status when bio fail
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/block/bio.c b/block/bio.c
index 963d1d406b3a..50e579088aca 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -277,7 +277,7 @@ static struct bio *__bio_chain_endio(struct bio *bio)
 {
 	struct bio *parent = bio->bi_private;
 
-	if (!parent->bi_status)
+	if (bio->bi_status && !parent->bi_status)
 		parent->bi_status = bio->bi_status;
 	bio_put(bio);
 	return parent;