From 3bfbb34b23b9bd46a7709130a4a240d9aa72f879 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Wed, 10 Jul 2013 15:42:55 -0400 Subject: [PATCH] LU-2800 autoconf: remove LC_INVALIDATE_BDEV_2ARG test invalidate_bdev has taken one argument since v2.6.22 We can remove the test and the dead code. Signed-off-by: James Simmons Signed-off-by: Jeff Mahoney Change-Id: I535f1cbe1c46fb5c98d5de046b85eb8365084d7b Reviewed-on: http://review.whamcloud.com/5345 Reviewed-by: Bob Glossman Tested-by: Hudson Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/autoconf/lustre-core.m4 | 17 ----------------- lustre/include/linux/lustre_compat25.h | 6 ------ lustre/llite/lloop.c | 2 +- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index b9fa7d7..5a778c2 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -424,22 +424,6 @@ LB_LINUX_TRY_COMPILE([ # 2.6.22 -# 2.6.22 lost second parameter for invalidate_bdev -AC_DEFUN([LC_INVALIDATE_BDEV_2ARG], -[AC_MSG_CHECKING([if invalidate_bdev has second argument]) -LB_LINUX_TRY_COMPILE([ - #include -],[ - invalidate_bdev(NULL,0); -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_INVALIDATE_BDEV_2ARG, 1, - [invalidate_bdev has second argument]) -],[ - AC_MSG_RESULT([no]) -]) -]) - # # 2.6.19 check for FS_RENAME_DOES_D_MOVE flag # @@ -1589,7 +1573,6 @@ AC_DEFUN([LC_PROG_LINUX], LC_PAGE_CONSTANT # 2.6.22 - LC_INVALIDATE_BDEV_2ARG LC_FS_RENAME_DOES_D_MOVE # 2.6.23 diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index 1cbdc42..cd3e386 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -202,12 +202,6 @@ int ll_unregister_blkdev(unsigned int dev, const char *name) } #endif -#ifdef HAVE_INVALIDATE_BDEV_2ARG -#define ll_invalidate_bdev(a,b) invalidate_bdev((a),(b)) -#else -#define ll_invalidate_bdev(a,b) invalidate_bdev((a)) -#endif - #ifndef FS_HAS_FIEMAP #define FS_HAS_FIEMAP (0) #endif diff --git a/lustre/llite/lloop.c b/lustre/llite/lloop.c index 7a5e000..107737b 100644 --- a/lustre/llite/lloop.c +++ b/lustre/llite/lloop.c @@ -589,7 +589,7 @@ static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev, lo->lo_offset = 0; lo->lo_sizelimit = 0; lo->lo_flags = 0; - ll_invalidate_bdev(bdev, 0); + invalidate_bdev(bdev); set_capacity(disks[lo->lo_number], 0); bd_set_size(bdev, 0); mapping_set_gfp_mask(filp->f_mapping, gfp); -- 1.8.3.1