]> granicus.if.org Git - zfs/commitdiff
Remove blk_end_request() autotools check.
authorRichard Yao <ryao@gentoo.org>
Mon, 7 Jul 2014 00:34:51 +0000 (20:34 -0400)
committerRichard Yao <ryao@gentoo.org>
Fri, 4 Sep 2015 19:37:24 +0000 (15:37 -0400)
Signed-off-by: Richard Yao <ryao@gentoo.org>
config/kernel-blk-end-request.m4 [deleted file]
config/kernel.m4
include/linux/blkdev_compat.h

diff --git a/config/kernel-blk-end-request.m4 b/config/kernel-blk-end-request.m4
deleted file mode 100644 (file)
index c2980e5..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-dnl #
-dnl # 2.6.31 API change
-dnl # In 2.6.29 kernels blk_end_request() was a GPL-only symbol, this was
-dnl # changed in 2.6.31 so it may be used by non-GPL modules.
-dnl #
-AC_DEFUN([ZFS_AC_KERNEL_BLK_END_REQUEST], [
-       AC_MSG_CHECKING([whether blk_end_request() is available])
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
-       ZFS_LINUX_TRY_COMPILE([
-               #include <linux/blkdev.h>
-       ],[
-               struct request *req = NULL;
-               (void) blk_end_request(req, 0, 0);
-       ],[
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_BLK_END_REQUEST, 1,
-                         [blk_end_request() is available])
-       ],[
-               AC_MSG_RESULT(no)
-       ])
-
-       AC_MSG_CHECKING([whether blk_end_request() is GPL-only])
-       ZFS_LINUX_TRY_COMPILE([
-               #include <linux/module.h>
-               #include <linux/blkdev.h>
-               
-               MODULE_LICENSE("$ZFS_META_LICENSE");
-       ],[
-               struct request *req = NULL;
-               (void) blk_end_request(req, 0, 0);
-       ],[
-               AC_MSG_RESULT(no)
-       ],[
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_BLK_END_REQUEST_GPL_ONLY, 1,
-                         [blk_end_request() is GPL-only])
-       ])
-       EXTRA_KCFLAGS="$tmp_flags"
-])
index b06cdfa591bb261497f342bf1a5e91c2015657da..dfaa4c64ab2b6fafbd6faf449f54cfd05a9aaef3 100644 (file)
@@ -28,7 +28,6 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
        ZFS_AC_KERNEL_BIO_RW_SYNC
        ZFS_AC_KERNEL_BIO_RW_SYNCIO
        ZFS_AC_KERNEL_REQ_SYNC
-       ZFS_AC_KERNEL_BLK_END_REQUEST
        ZFS_AC_KERNEL_BLK_QUEUE_FLUSH
        ZFS_AC_KERNEL_BLK_QUEUE_MAX_HW_SECTORS
        ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS
index 2dbf87ca6e0f4f764808e23c3a5973321c2fd727..a8a2700aff55ec174fb70f6f0cbf6c89d85b9b56 100644 (file)
@@ -58,80 +58,6 @@ blk_requeue_request(request_queue_t *q, struct request *req)
 }
 #endif /* HAVE_BLK_REQUEUE_REQUEST */
 
-#ifndef HAVE_BLK_END_REQUEST
-static inline bool
-__blk_end_request(struct request *req, int error, unsigned int nr_bytes)
-{
-       LIST_HEAD(list);
-
-       /*
-        * Request has already been dequeued but 2.6.18 version of
-        * end_request() unconditionally dequeues the request so we
-        * add it to a local list to prevent hitting the BUG_ON.
-        */
-       list_add(&req->queuelist, &list);
-
-       /*
-        * The old API required the driver to end each segment and not
-        * the entire request.  In our case we always need to end the
-        * entire request partial requests are not supported.
-        */
-       req->hard_cur_sectors = nr_bytes >> 9;
-       end_request(req, ((error == 0) ? 1 : error));
-
-       return (0);
-}
-
-static inline bool
-blk_end_request(struct request *req, int error, unsigned int nr_bytes)
-{
-       struct request_queue *q = req->q;
-       bool rc;
-
-       spin_lock_irq(q->queue_lock);
-       rc = __blk_end_request(req, error, nr_bytes);
-       spin_unlock_irq(q->queue_lock);
-
-       return (rc);
-}
-#else
-#ifdef HAVE_BLK_END_REQUEST_GPL_ONLY
-/*
- * Define required to avoid conflicting 2.6.29 non-static prototype for a
- * GPL-only version of the helper.  As of 2.6.31 the helper is available
- * to non-GPL modules and is not explicitly exported GPL-only.
- */
-#define        __blk_end_request __blk_end_request_x
-#define        blk_end_request blk_end_request_x
-
-static inline bool
-__blk_end_request_x(struct request *req, int error, unsigned int nr_bytes)
-{
-       /*
-        * The old API required the driver to end each segment and not
-        * the entire request.  In our case we always need to end the
-        * entire request partial requests are not supported.
-        */
-       req->hard_cur_sectors = nr_bytes >> 9;
-       end_request(req, ((error == 0) ? 1 : error));
-
-       return (0);
-}
-static inline bool
-blk_end_request_x(struct request *req, int error, unsigned int nr_bytes)
-{
-       struct request_queue *q = req->q;
-       bool rc;
-
-       spin_lock_irq(q->queue_lock);
-       rc = __blk_end_request_x(req, error, nr_bytes);
-       spin_unlock_irq(q->queue_lock);
-
-       return (rc);
-}
-#endif /* HAVE_BLK_END_REQUEST_GPL_ONLY */
-#endif /* HAVE_BLK_END_REQUEST */
-
 /*
  * 2.6.36 API change,
  * The blk_queue_flush() interface has replaced blk_queue_ordered()