File: fix-build-error-on-linux-4.3.patch

package info (click to toggle)
flashcache 3.1.3%2Bgit20150701-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,116 kB
  • ctags: 1,310
  • sloc: ansic: 9,797; sh: 403; perl: 329; makefile: 201
file content (21 lines) | stat: -rw-r--r-- 653 bytes parent folder | download
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	
 }