Errors compiling 2.3.51

From: Jeffrey Fielding (JJProg@cyberbury.net)
Date: Sun Mar 12 2000 - 16:10:45 EST


    I'm new to kernel development, so I apologize if I'm not sending
this patch correctly.

    When compiling version 2.3.51 of the kernel with modules disabled, I
got the following error messages from the linker:
fs/fs.o: In function 'fs_name'
fs/fs.o(.text+0x580d): undefined reference to 'try_inc_mod_count'
fs/fs.o: In function 'get_fs_type':
fs/fs.o(.text+0x5949): undefined reference to 'try_inc_mod_count'
fs/fs.o: In function 'mount_root':
fs/fs.o(.init+0x116): undefined reference to 'try_inc_mod_count'
drivers/parport/parport.a(parport_pc.o): In function 'parport_pc_init':
parport_pc.o(.text.init+0x116): undefined reference to
'parport_pc_init_pci'

    I changed fs/super.c to eliminate references to try_inc_mod_count
whenever CONFIG_MODULES is undefined. I also eliminated references to
parport_pc_init_pci, since parport_pc_init_pci doesn't seem to be
defined anywhere. I've pasted my patch for super.c below. Since my fix
for parport_pc_init_pci is rather crude, I haven't included a patch for
it here. You can fix it rather simply by commenting out any references
to parport_pc_init_pci. On my computer, I just commented it out in
include/asm/parport.h, though I don't know about other architectures.

Jeff Fielding
JJProg@cyberbury.net

--- linux-2.3.51/fs/super.c Fri Mar 10 17:54:29 2000
+++ linux/fs/super.c Sun Mar 12 14:54:13 2000
@@ -161,8 +161,13 @@

  spin_lock(&file_systems_lock);
  for (tmp = file_systems; tmp; tmp = tmp->next, index--)
+ #ifdef CONFIG_MODULES
   if (index <= 0 && try_inc_mod_count(tmp->owner))
     break;
+ #else
+ if (index <= 0)
+ break;
+ #endif
  spin_unlock(&file_systems_lock);
  if (!tmp)
   return -EINVAL;
@@ -234,14 +239,18 @@

  spin_lock(&file_systems_lock);
  fs = *(find_filesystem(name));
+ #ifdef CONFIG_MODULES
  if (fs && !try_inc_mod_count(fs->owner))
   fs = NULL;
+ #endif
  spin_unlock(&file_systems_lock);
  if (!fs && (request_module(name) == 0)) {
   spin_lock(&file_systems_lock);
   fs = *(find_filesystem(name));
+ #ifdef CONFIG_MODULES
   if (fs && !try_inc_mod_count(fs->owner))
    fs = NULL;
+ #endif
   spin_unlock(&file_systems_lock);
  }
  return fs;
@@ -1286,8 +1295,10 @@
  for (fs_type = file_systems ; fs_type ; fs_type = fs_type->next) {
     if (!(fs_type->fs_flags & FS_REQUIRES_DEV))
      continue;
+ #ifdef CONFIG_MODULES
   if (!try_inc_mod_count(fs_type->owner))
    continue;
+ #endif
   spin_unlock(&file_systems_lock);
   sb = get_super(ROOT_DEV);
   if (sb) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:22 EST