lib/dynlocks.c | 152 +++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 187 insertions(+), 2 deletions(-)
-Index: linux-2.4.21-suse2/include/linux/dynlocks.h
+Index: linux-2.6.7/include/linux/dynlocks.h
===================================================================
---- linux-2.4.21-suse2.orig/include/linux/dynlocks.h 2003-01-30 13:24:37.000000000 +0300
-+++ linux-2.4.21-suse2/include/linux/dynlocks.h 2004-08-19 13:11:02.000000000 +0400
+--- linux-2.6.7.orig/include/linux/dynlocks.h 2003-01-30 13:24:37.000000000 +0300
++++ linux-2.6.7/include/linux/dynlocks.h 2004-09-07 14:12:39.000000000 +0400
@@ -0,0 +1,43 @@
+#ifndef _LINUX_DYNLOCKS_H
+#define _LINUX_DYNLOCKS_H
+
+#endif
+
-Index: linux-2.4.21-suse2/lib/dynlocks.c
+Index: linux-2.6.7/lib/dynlocks.c
===================================================================
---- linux-2.4.21-suse2.orig/lib/dynlocks.c 2003-01-30 13:24:37.000000000 +0300
-+++ linux-2.4.21-suse2/lib/dynlocks.c 2004-08-19 13:11:02.000000000 +0400
+--- linux-2.6.7.orig/lib/dynlocks.c 2003-01-30 13:24:37.000000000 +0300
++++ linux-2.6.7/lib/dynlocks.c 2004-09-07 14:12:39.000000000 +0400
@@ -0,0 +1,187 @@
+/*
+ * Dynamic Locks
+EXPORT_SYMBOL(dynlock_lock);
+EXPORT_SYMBOL(dynlock_unlock);
+
-Index: linux-2.4.21-suse2/lib/Makefile
+Index: linux-2.6.7/lib/Makefile
===================================================================
---- linux-2.4.21-suse2.orig/lib/Makefile 2003-10-28 21:34:24.000000000 +0300
-+++ linux-2.4.21-suse2/lib/Makefile 2004-08-19 13:11:31.000000000 +0400
-@@ -9,10 +9,10 @@
- L_TARGET := lib.a
+--- linux-2.6.7.orig/lib/Makefile 2004-08-26 17:12:16.000000000 +0400
++++ linux-2.6.7/lib/Makefile 2004-09-07 14:13:03.000000000 +0400
+@@ -6,7 +6,7 @@
+ lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \
+ bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \
+ kobject.o idr.o div64.o parser.o int_sqrt.o \
+- bitmap.o extable.o
++ bitmap.o extable.o dynlocks.o
- export-objs := cmdline.o dec_and_lock.o rwsem.o rbtree.o qsort.o \
-- firmware_class.o
-+ firmware_class.o dynlocks.o
-
- obj-y := errno.o ctype.o string.o vsprintf.o brlock.o cmdline.o \
-- bust_spinlocks.o rbtree.o dump_stack.o rwsem.o md5.o
-+ bust_spinlocks.o rbtree.o dump_stack.o rwsem.o md5.o dynlocks.o
-
- obj-$(CONFIG_FW_LOADER) += firmware_class.o
- obj-$(CONFIG_QSORT) += qsort.o
-Index: linux-2.4.21-suse2/fs/dcache.c
+ # hack for now till some static code uses krefs, then it can move up above...
+ obj-y += kref.o
+Index: linux-2.6.7/fs/dcache.c
===================================================================
---- linux-2.4.21-suse2.orig/fs/dcache.c 2004-08-19 12:57:06.000000000 +0400
-+++ linux-2.4.21-suse2/fs/dcache.c 2004-08-19 13:11:02.000000000 +0400
-@@ -1312,6 +1312,7 @@
+--- linux-2.6.7.orig/fs/dcache.c 2004-09-06 22:53:19.000000000 +0400
++++ linux-2.6.7/fs/dcache.c 2004-09-07 14:13:42.000000000 +0400
+@@ -1654,6 +1654,7 @@
+
extern void bdev_cache_init(void);
- extern void cdev_cache_init(void);
- extern void iobuf_cache_init(void);
+ extern void chrdev_init(void);
+extern void dynlock_cache_init(void);
void __init vfs_caches_init(unsigned long mempages)
{
-@@ -1348,4 +1349,5 @@
+@@ -1677,6 +1678,7 @@
+ mnt_init(mempages);
bdev_cache_init();
- cdev_cache_init();
- iobuf_cache_init();
+ chrdev_init();
+ dynlock_cache_init();
}
+
+ EXPORT_SYMBOL(d_alloc);