Whamcloud - gitweb
LU-6215 llite: make_request_fn returns blk_qc_t in kernel 4.4
[fs/lustre-release.git] / lustre / include / lustre_compat.h
index c038aa1..4e9f3ac 100644 (file)
@@ -298,12 +298,17 @@ static inline int ll_namei_to_lookup_intent_flag(int flag)
        return flag;
 }
 
-#ifdef HAVE_VOID_MAKE_REQUEST_FN
-# define ll_mrf_ret void
-# define LL_MRF_RETURN(rc)
+#ifdef HAVE_QC_MAKE_REQUEST_FN
+# define ll_mrf_ret blk_qc_t
+# define LL_MRF_RETURN(rc) RETURN(BLK_QC_T_NONE)
 #else
-# define ll_mrf_ret int
-# define LL_MRF_RETURN(rc) RETURN(rc)
+# ifdef HAVE_VOID_MAKE_REQUEST_FN
+#  define ll_mrf_ret void
+#  define LL_MRF_RETURN(rc)
+# else
+#  define ll_mrf_ret int
+#  define LL_MRF_RETURN(rc) RETURN(rc)
+# endif
 #endif
 
 #include <linux/fs.h>