diff --git a/lustre/ChangeLog b/lustre/ChangeLog
index 7bcffb152fb6fdf24d0e7835fd06425bc488cfed..9764ee853106ab5a01975cdde21d41ee0b3736a3 100644
--- a/lustre/ChangeLog
+++ b/lustre/ChangeLog
@@ -436,6 +436,9 @@ Description: Remove 2.4 kernel checks lustre 1.8
 Details    : Remove 2.5.0 check from dcache.c dir.c file.c llite_internal.h
              llite_lib.c llite_mmap.c lproc_llite.c namei.c rw.c symlink.c
              llite subsystem.
+	     Remove 2.5.0 check from handler.c lproc_mds.c mds_fs.c
+	     mds_internal.h mds_lib.c mds_open.c mds_reint.c mds_xattr.c
+	     in mds subsystem.
 
 --------------------------------------------------------------------------------
 
diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c
index 9ab8f6362996b0ba281acaa176805c0148a9af47..1472f48c399d7492b7a296ded1b2e07849f124d2 100644
--- a/lustre/mds/handler.c
+++ b/lustre/mds/handler.c
@@ -40,14 +40,10 @@
 #include <linux/random.h>
 #include <linux/fs.h>
 #include <linux/jbd.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-# include <linux/smp_lock.h>
-# include <linux/buffer_head.h>
-# include <linux/workqueue.h>
-# include <linux/mount.h>
-#else
-# include <linux/locks.h>
-#endif
+#include <linux/smp_lock.h>
+#include <linux/buffer_head.h>
+#include <linux/workqueue.h>
+#include <linux/mount.h>
 
 #include <linux/lustre_acl.h>
 #include <obd_class.h>
@@ -635,11 +631,9 @@ int mds_pack_posix_acl(struct inode *inode, struct lustre_msg *repmsg,
         if (!inode->i_op || !inode->i_op->getxattr)
                 GOTO(out, 0);
 
-        lock_24kernel();
         rc = inode->i_op->getxattr(&de, MDS_XATTR_NAME_ACL_ACCESS,
                                    lustre_msg_buf(repmsg, repoff, buflen),
                                    buflen);
-        unlock_24kernel();
 
         if (rc >= 0)
                 repbody->aclsize = rc;
@@ -814,10 +808,8 @@ static int mds_getattr_pack_msg(struct ptlrpc_request *req, struct inode *inode,
 
                 size[bufcount] = 0;
                 if (inode->i_op && inode->i_op->getxattr) {
-                        lock_24kernel();
                         rc = inode->i_op->getxattr(&de, MDS_XATTR_NAME_ACL_ACCESS,
                                                    NULL, 0);
-                        unlock_24kernel();
 
                         if (rc < 0) {
                                 if (rc != -ENODATA) {
diff --git a/lustre/mds/lproc_mds.c b/lustre/mds/lproc_mds.c
index 05ae7190c1aa036cb207340fc0f408f439efef34..f8c7f834536e119c82bff7d9c095608c63f14df4 100644
--- a/lustre/mds/lproc_mds.c
+++ b/lustre/mds/lproc_mds.c
@@ -25,9 +25,7 @@
 #define DEBUG_SUBSYSTEM S_CLASS
 
 #include <linux/version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
 #include <asm/statfs.h>
-#endif
 #include <obd.h>
 #include <obd_class.h>
 #include <lprocfs_status.h>
diff --git a/lustre/mds/mds_fs.c b/lustre/mds/mds_fs.c
index 1ef9533c99e12e7f5f9b28ee5d31db3f00954019..f4083dd78af929d19c34d6a133d835076f481a6f 100644
--- a/lustre/mds/mds_fs.c
+++ b/lustre/mds/mds_fs.c
@@ -36,9 +36,7 @@
 #include <linux/version.h>
 #include <linux/sched.h>
 #include <lustre_quota.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
 #include <linux/mount.h>
-#endif
 #include <lustre_mds.h>
 #include <obd_class.h>
 #include <obd_support.h>
diff --git a/lustre/mds/mds_internal.h b/lustre/mds/mds_internal.h
index 35e312d051bd47337385f7d42b39374953d72d9c..cdcc0f0ad0ac437beb93b7b73839bfd1655bedd4 100644
--- a/lustre/mds/mds_internal.h
+++ b/lustre/mds/mds_internal.h
@@ -43,11 +43,7 @@ static inline struct mds_obd *mds_req2mds(struct ptlrpc_request *req)
 
 #ifdef __KERNEL__
 /* Open counts for files.  No longer atomic, must hold inode->i_sem */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
 # define mds_inode_oatomic(inode)    ((inode)->i_cindex)
-#else
-# define mds_inode_oatomic(inode)    ((inode)->i_attr_flags)
-#endif
 
 #ifdef HAVE_I_ALLOC_SEM
 #define MDS_UP_READ_ORPHAN_SEM(i)          UP_READ_I_ALLOC_SEM(i)
diff --git a/lustre/mds/mds_lib.c b/lustre/mds/mds_lib.c
index 83203dedac0e36438753efdcb1df7e3f289de756..b423941e597749a72f3d5cb50ac323707c9e374e 100644
--- a/lustre/mds/mds_lib.c
+++ b/lustre/mds/mds_lib.c
@@ -34,11 +34,7 @@
 #include <linux/stat.h>
 #include <linux/errno.h>
 #include <linux/version.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-# include <linux/locks.h>   // for wait_on_buffer
-#else
-# include <linux/buffer_head.h>   // for wait_on_buffer
-#endif
+#include <linux/buffer_head.h>   // for wait_on_buffer
 #include <linux/unistd.h>
 
 #include <asm/system.h>
diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c
index 51368837e5b3a056869ef5cc180e8c1a30bb19b1..041fdc5263861185d880bde1ef02a7f6982c450a 100644
--- a/lustre/mds/mds_open.c
+++ b/lustre/mds/mds_open.c
@@ -35,12 +35,8 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-# include <linux/buffer_head.h>
-# include <linux/workqueue.h>
-#else
-# include <linux/locks.h>
-#endif
+#include <linux/buffer_head.h>
+#include <linux/workqueue.h>
 
 #include <obd_class.h>
 #include <obd_lov.h>
diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c
index 6e2688bda80a4f23b211abb18ecd0c72453c9f3f..c5480619eb5dea7714c338ca7428c5fca54798b9 100644
--- a/lustre/mds/mds_reint.c
+++ b/lustre/mds/mds_reint.c
@@ -2244,12 +2244,10 @@ no_unlink:
         OBD_FAIL_WRITE(OBD_FAIL_MDS_REINT_RENAME_WRITE,
                        de_srcdir->d_inode->i_sb);
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
         /* Check if we are moving old entry into its child. 2.6 does not
            check for this in vfs_rename() anymore */
         if (is_subdir(de_new, de_old))
                 GOTO(cleanup, rc = -EINVAL);
-#endif
 
         lmm = lustre_msg_buf(req->rq_repmsg, offset + 1, 0);
         handle = fsfilt_start_log(obd, de_tgtdir->d_inode, FSFILT_OP_RENAME,
diff --git a/lustre/mds/mds_xattr.c b/lustre/mds/mds_xattr.c
index 52e9a5f245f709f140a7f3195b6cddaeb9e85428..ce3199d55d281b79aaa5c83bb1d064e40cb5b1c1 100644
--- a/lustre/mds/mds_xattr.c
+++ b/lustre/mds/mds_xattr.c
@@ -132,10 +132,8 @@ static int mds_getxattr_internal(struct obd_device *obd,
                 DEBUG_REQ(D_INODE, req, "getxattr %s", xattr_name);
 
                 if (inode->i_op && inode->i_op->getxattr) {
-                        lock_24kernel();
                         rc = inode->i_op->getxattr(dentry, xattr_name,
                                                    buf, buflen);
-                        unlock_24kernel();
                 }
 
                 if (rc < 0 && rc != -ENODATA && rc != -EOPNOTSUPP &&
@@ -145,9 +143,7 @@ static int mds_getxattr_internal(struct obd_device *obd,
                 DEBUG_REQ(D_INODE, req, "listxattr");
 
                 if (inode->i_op && inode->i_op->listxattr) {
-                        lock_24kernel();
                         rc = inode->i_op->listxattr(dentry, buf, buflen);
-                        unlock_24kernel();
                 }
                 if (rc < 0)
                         CDEBUG(D_OTHER, "listxattr failed: %d\n", rc);
@@ -289,18 +285,14 @@ int mds_setxattr_internal(struct ptlrpc_request *req, struct mds_body *body)
                                                        REQ_REC_OFF+2, xattrlen);
 
                         LOCK_INODE_MUTEX(inode);
-                        lock_24kernel();
                         rc = inode->i_op->setxattr(de, xattr_name, xattr,
                                                    xattrlen, body->flags);
-                        unlock_24kernel();
                         UNLOCK_INODE_MUTEX(inode);
                 }
         } else if (body->valid & OBD_MD_FLXATTRRM) {
                 if (inode->i_op && inode->i_op->removexattr) {
                         LOCK_INODE_MUTEX(inode);
-                        lock_24kernel();
                         rc = inode->i_op->removexattr(de, xattr_name);
-                        unlock_24kernel();
                         UNLOCK_INODE_MUTEX(inode);
                 }
         } else {