Whamcloud - gitweb
LU-2800 autoconf: remove LC_UNREGISTER_BLKDEV_RETURN_INT test 49/5349/7
authorJames Simmons <uja.ornl@gmail.com>
Fri, 2 Aug 2013 13:33:24 +0000 (09:33 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 17 Aug 2013 06:53:37 +0000 (06:53 +0000)
unregister_blkdev has returned void since v2.6.23
We can remove the test and the dead code.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Change-Id: Ic303ed75516064e508a1f84e6d64a6fa2f10a340
Reviewed-on: http://review.whamcloud.com/5349
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/autoconf/lustre-core.m4
lustre/include/linux/lustre_compat25.h
lustre/llite/lloop.c

index 9544315..1ace1f6 100644 (file)
@@ -442,25 +442,6 @@ LB_LINUX_TRY_COMPILE([
 ])
 ])
 
-# 2.6.23
-
-# 2.6.23 have return type 'void' for unregister_blkdev
-AC_DEFUN([LC_UNREGISTER_BLKDEV_RETURN_INT],
-[AC_MSG_CHECKING([if unregister_blkdev return int])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        int i __attribute__ ((unused));
-        i = unregister_blkdev(0,NULL);
-],[
-        AC_MSG_RESULT([yes])
-        AC_DEFINE(HAVE_UNREGISTER_BLKDEV_RETURN_INT, 1,
-                [unregister_blkdev return int])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
 # 2.6.24
 
 # 2.6.24 has bio_endio with 2 args
@@ -1537,9 +1518,6 @@ AC_DEFUN([LC_PROG_LINUX],
         # 2.6.22
          LC_FS_RENAME_DOES_D_MOVE
 
-         # 2.6.23
-         LC_UNREGISTER_BLKDEV_RETURN_INT
-
          # 2.6.24
          LC_BIO_ENDIO_2ARG
          LC_PROCFS_DELETED
index 902aeb6..4a02314 100644 (file)
@@ -185,17 +185,6 @@ static inline struct file *ll_dentry_open(struct path *path, int flags,
 #define TREE_READ_UNLOCK_IRQ(mapping)  spin_unlock_irq(&(mapping)->tree_lock)
 #endif
 
-#ifdef HAVE_UNREGISTER_BLKDEV_RETURN_INT
-#define ll_unregister_blkdev(a,b)       unregister_blkdev((a),(b))
-#else
-static inline
-int ll_unregister_blkdev(unsigned int dev, const char *name)
-{
-        unregister_blkdev(dev, name);
-        return 0;
-}
-#endif
-
 #ifndef FS_HAS_FIEMAP
 #define FS_HAS_FIEMAP                  (0)
 #endif
index 0a1b6da..2e24b07 100644 (file)
@@ -866,10 +866,7 @@ static void lloop_exit(void)
                 blk_cleanup_queue(loop_dev[i].lo_queue);
                 put_disk(disks[i]);
         }
-        if (ll_unregister_blkdev(lloop_major, "lloop"))
-                CWARN("lloop: cannot unregister blkdev\n");
-        else
-                CDEBUG(D_CONFIG, "unregistered lloop major %d\n", lloop_major);
+       unregister_blkdev(lloop_major, "lloop");
 
         OBD_FREE(disks, max_loop * sizeof(*disks));
         OBD_FREE(loop_dev, max_loop * sizeof(*loop_dev));