From 7e57a447b497a01127dd83ec7b05ab56909c26df Mon Sep 17 00:00:00 2001 From: yangsheng Date: Tue, 9 Oct 2007 04:04:29 +0000 Subject: [PATCH] Branch HEAD b=13568 i=adilger i=deen Remove 2.4 kernel check from obdclass subsystem. --- lustre/ChangeLog | 4 +++ lustre/obdclass/linux/linux-sysctl.c | 3 --- lustre/obdclass/obd_mount.c | 47 +++--------------------------------- 3 files changed, 8 insertions(+), 46 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index c120b35..4c84cec 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -373,6 +373,10 @@ Bugzilla : 13568 Description: Remove 2.4 kernel checks lustre 1.8 Details : Remove 2.5.0 check from quota_check.c, quota_ctl.c, quota_interface.c in quota subsystem. + Remove 2.4 kernel check from obd_mount.c, linux/linux-sysctl.c in + obdclass subsystem. + + -------------------------------------------------------------------------------- diff --git a/lustre/obdclass/linux/linux-sysctl.c b/lustre/obdclass/linux/linux-sysctl.c index e1415c6..4fd277c 100644 --- a/lustre/obdclass/linux/linux-sysctl.c +++ b/lustre/obdclass/linux/linux-sysctl.c @@ -30,9 +30,6 @@ #include #include #include -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) -#include -#endif #include #include #include diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index b070f25..202c740 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -1321,25 +1321,10 @@ static struct vfsmount *server_kernel_mount(struct super_block *sb) mnt = ll_kern_mount("ldiskfs", s_flags, lmd->lmd_dev, 0); if (IS_ERR(mnt)) { rc = PTR_ERR(mnt); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) - /* 2.6 kernels: if ldiskfs fails, try ldiskfs2 */ - mnt = ll_kern_mount("ldiskfs2", s_flags, lmd->lmd_dev, 0); - if (IS_ERR(mnt)) { - int rc2 = PTR_ERR(mnt); - CERROR("premount %s:%#lx ldiskfs failed: %d, ldiskfs2 " - "failed: %d. Is the ldiskfs module available?\n", - lmd->lmd_dev, s_flags, rc, rc2); - GOTO(out_free, rc); - } -#else - /* 2.4 kernels: if ldiskfs fails, try ext3 */ - mnt = ll_kern_mount("ext3", s_flags, lmd->lmd_dev, 0); - if (IS_ERR(mnt)) { - rc = PTR_ERR(mnt); - CERROR("premount ext3 failed: rc = %d\n", rc); - GOTO(out_free, rc); - } -#endif + CERROR("premount %s:%#lx ldiskfs failed: %d " + "Is the ldiskfs module available?\n", + lmd->lmd_dev, s_flags, rc ); + GOTO(out_free, rc); } OBD_SET_CTXT_MAGIC(&mount_ctxt); @@ -2121,8 +2106,6 @@ void lustre_register_kill_super_cb(void (*cfs)(struct super_block *sb)) /***************** FS registration ******************/ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) -/* 2.5 and later */ #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) struct super_block * lustre_get_sb(struct file_system_type *fs_type, int flags, const char *devname, void * data) @@ -2162,28 +2145,6 @@ struct file_system_type lustre_fs_type = { .fs_flags = FS_BINARY_MOUNTDATA | FS_REQUIRES_DEV, }; -#else -/* 2.4 */ -static struct super_block *lustre_read_super(struct super_block *sb, - void *data, int silent) -{ - int rc; - ENTRY; - - rc = lustre_fill_super(sb, data, silent); - if (rc) - RETURN(NULL); - RETURN(sb); -} - -static struct file_system_type lustre_fs_type = { - .owner = THIS_MODULE, - .name = "lustre", - .fs_flags = FS_NFSEXP_FSID, - .read_super = lustre_read_super, -}; -#endif - int lustre_register_fs(void) { return register_filesystem(&lustre_fs_type); -- 1.8.3.1