]) # LC_SYMLINK_OPS_USE_NAMEIDATA
#
+# LC_BIO_ENDIO_USES_ONE_ARG
+#
+# 4.2 kernel bio_endio now only takes one argument
+#
+AC_DEFUN([LC_BIO_ENDIO_USES_ONE_ARG], [
+LB_CHECK_COMPILE([if 'bio_endio' with one argument exist],
+bio_endio, [
+ #include <linux/bio.h>
+],[
+ bio_endio(NULL);
+],[
+ AC_DEFINE(HAVE_BIO_ENDIO_USES_ONE_ARG, 1,
+ [bio_endio takes only one argument])
+])
+]) # LC_BIO_ENDIO_USES_ONE_ARG
+
+#
# LC_PROG_LINUX
#
# Lustre linux kernel checks
# 4.2
LC_NEW_CANCEL_DIRTY_PAGE
+ LC_BIO_ENDIO_USES_ONE_ARG
LC_SYMLINK_OPS_USE_NAMEIDATA
#
static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio)
{
- int ret;
- ret = do_bio_lustrebacked(lo, bio);
- while (bio) {
- struct bio *tmp = bio->bi_next;
- bio->bi_next = NULL;
+ int ret;
+
+ ret = do_bio_lustrebacked(lo, bio);
+ while (bio) {
+ struct bio *tmp = bio->bi_next;
+
+ bio->bi_next = NULL;
+#ifdef HAVE_BIO_ENDIO_USES_ONE_ARG
+ bio->bi_error = ret;
+ bio_endio(bio);
+#else
bio_endio(bio, ret);
- bio = tmp;
- }
+#endif
+ bio = tmp;
+ }
}
static inline int loop_active(struct lloop_device *lo)