From c1f7cabab290f16fefee43001b62f20dc5c35e42 Mon Sep 17 00:00:00 2001
From: yangsheng <yangsheng>
Date: Fri, 2 Nov 2007 07:49:33 +0000
Subject: [PATCH] Branch HEAD b=13568 i=shadow i=adilger

Remove 2.4 kernel code from lustre/mdc/mdc_request.c.
---
 lustre/ChangeLog         | 1 +
 lustre/mdc/mdc_request.c | 8 --------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/lustre/ChangeLog b/lustre/ChangeLog
index 99b7f792eb..09edcfdf4b 100644
--- a/lustre/ChangeLog
+++ b/lustre/ChangeLog
@@ -36,6 +36,7 @@ Details    : Remove 2.5.0 check from quota_check.c, quota_ctl.c,
 	     lustre/mgs/mgs_fs.c.
 	     Remove 2.4 kernel code from lustre/mgc/mgc_request.c.
 	     Remove 2.4 kernel check from lustre/mdt/mdt_lproc.c.
+	     Remove 2.4 kernel code from lustre/mdc/mdc_request.c.
 
 Severity   : enhancement
 Bugzilla   : 13690
diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c
index dfcb26b966..8eb065dd07 100644
--- a/lustre/mdc/mdc_request.c
+++ b/lustre/mdc/mdc_request.c
@@ -1054,14 +1054,10 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
         int rc;
         ENTRY;
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        MOD_INC_USE_COUNT;
-#else
         if (!try_module_get(THIS_MODULE)) {
                 CERROR("Can't get module. Is it alive?");
                 return -EINVAL;
         }
-#endif
         switch (cmd) {
         case OBD_IOC_CLIENT_RECOVER:
                 rc = ptlrpc_recover_import(imp, data->ioc_inlbuf1);
@@ -1094,11 +1090,7 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
                 GOTO(out, rc = -ENOTTY);
         }
 out:
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        MOD_DEC_USE_COUNT;
-#else
         module_put(THIS_MODULE);
-#endif
 
         return rc;
 }
-- 
GitLab