From 1624b769243fa2313f7ffc2ea60a0869faa2b8a5 Mon Sep 17 00:00:00 2001 From: handeng Date: Fri, 12 Oct 2018 23:35:31 +0800 Subject: [PATCH 1/2] Fix build error on Linux 4.13 --- src/flashcache_subr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/flashcache_subr.c b/src/flashcache_subr.c index b2e2159..9430845 100644 --- a/src/flashcache_subr.c +++ b/src/flashcache_subr.c @@ -738,8 +738,11 @@ flashcache_bio_endio(struct bio *bio, int error, bio_endio(bio, bio->bi_size, error); #elif LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) bio_endio(bio, error); +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0) + bio->bi_error = error; + bio_endio(bio); #else - bio->bi_error = error; + bio->bi_status = error; bio_endio(bio); #endif } From 7787a88dd346c52633129202b1c7162e6e423e33 Mon Sep 17 00:00:00 2001 From: handeng Date: Fri, 12 Oct 2018 23:37:47 +0800 Subject: [PATCH 2/2] Update flashcache_subr.c --- src/flashcache_subr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/flashcache_subr.c b/src/flashcache_subr.c index 9430845..50be2c1 100644 --- a/src/flashcache_subr.c +++ b/src/flashcache_subr.c @@ -739,10 +739,10 @@ flashcache_bio_endio(struct bio *bio, int error, #elif LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) bio_endio(bio, error); #elif LINUX_VERSION_CODE < KERNEL_VERSION(4,13,0) - bio->bi_error = error; - bio_endio(bio); + bio->bi_error = error; + bio_endio(bio); #else - bio->bi_status = error; + bio->bi_status = error; bio_endio(bio); #endif }