From 615e9b48c65be67d9b7e0cd3a7ec226eba7f45fc Mon Sep 17 00:00:00 2001 From: James Simmons Date: Fri, 2 Aug 2013 09:33:24 -0400 Subject: [PATCH] LU-2800 autoconf: remove LC_UNREGISTER_BLKDEV_RETURN_INT test unregister_blkdev has returned void since v2.6.23 We can remove the test and the dead code. Signed-off-by: Jeff Mahoney Signed-off-by: James Simmons Change-Id: Ic303ed75516064e508a1f84e6d64a6fa2f10a340 Reviewed-on: http://review.whamcloud.com/5349 Tested-by: Hudson Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 22 ---------------------- lustre/include/linux/lustre_compat25.h | 11 ----------- lustre/llite/lloop.c | 5 +---- 3 files changed, 1 insertion(+), 37 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 9544315..1ace1f6 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -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 -],[ - 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 diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index 902aeb6..4a02314 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -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 diff --git a/lustre/llite/lloop.c b/lustre/llite/lloop.c index 0a1b6da..2e24b07 100644 --- a/lustre/llite/lloop.c +++ b/lustre/llite/lloop.c @@ -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)); -- 1.8.3.1