1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Description: Fix build error on Linux 4.3
In Linux 4.3, bio_endio don't support error parameter any more, so
bio_endio(bio, error) should be converted bio_endio(bio).
Origin: upstream(not accepted yet), https://github.com/facebook/flashcache/pull/213
Author: Vinson Lee vlee@freedesktop.org
--- a/src/flashcache_subr.c
+++ b/src/flashcache_subr.c
@@ -736,8 +736,11 @@
flashcache_record_latency(dmc, start_time);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
bio_endio(bio, bio->bi_size, error);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0)
bio_endio(bio, error);
+#else
+ bio->bi_error = error;
+ bio_endio(bio);
#endif
}
|