two fixes for 2.1.116-pre2

Mikael Pettersson (mikpe@csd.uu.se)
Mon, 17 Aug 1998 00:14:11 +0200 (MET DST)


Here is a patch for two problems in 2.1.116-pre2:
* kmod.c was broken when some counter fields were changed
from plain `int' to `atomic_t'
* arch/i386/lib/lock_check.c doesn't compile (and isn't
needed) under i386/UP since __check_lock() is a macro

/Mikael

--- linux-2.1.116-pre2/kernel/kmod.c.~1~ Sun Aug 16 19:19:20 1998
+++ linux-2.1.116-pre2/kernel/kmod.c Sun Aug 16 22:57:51 1998
@@ -41,7 +41,7 @@
/* don't use the user's root, use init's root instead */
exit_fs(current); /* current->fs->count--; */
current->fs = task_init->fs;
- current->fs->count++;
+ atomic_inc(&current->fs->count);

unlock_kernel();
}
--- linux-2.1.116-pre2/arch/i386/lib/Makefile.~1~ Sun Aug 16 19:19:16 1998
+++ linux-2.1.116-pre2/arch/i386/lib/Makefile Sun Aug 16 20:55:40 1998
@@ -6,6 +6,10 @@
$(CC) -D__ASSEMBLY__ $(AFLAGS) -traditional -c $< -o $*.o

L_TARGET = lib.a
-L_OBJS = checksum.o semaphore.o delay.o usercopy.o getuser.o putuser.o lock.o lock_check.o
+L_OBJS = checksum.o semaphore.o delay.o usercopy.o getuser.o putuser.o lock.o
+
+ifdef SMP
+L_OBJS += lock_check.o
+endif

include $(TOPDIR)/Rules.make

-
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.altern.org/andrebalsa/doc/lkml-faq.html