[Tux3] keeping kernel port in sync with latest kernel sources?

Daniel Phillips phillips at phunq.net
Sat Jan 3 20:30:46 PST 2009


On Saturday 03 January 2009 19:46, Daniel Phillips wrote:
> On Saturday 03 January 2009 19:30, Liu XiaoFeng wrote:
> > I have run tux3 with Linus' git tree. Seems it works well after a
> > single-line patch applied.
> 
> Since it is such a small change I suppose we should make that
> version-dependent and support all recent kernels.

I committed the patch below, thanks.

Daniel

diff -r b005272c243d user/kernel/super.c
--- a/user/kernel/super.c	Fri Jan 02 01:50:49 2009 -0800
+++ b/user/kernel/super.c	Sat Jan 03 20:26:12 2009 -0800
@@ -9,7 +9,11 @@
 
 static struct kmem_cache *tux_inode_cachep;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
 static void tux3_inode_init_once(struct kmem_cache *cachep, void *mem)
+#else
+static void tux3_inode_init_once(void *mem)
+#endif
 {
 	inode_init_once(&((tuxnode_t *)mem)->vfs_inode);
 }
diff -r b005272c243d user/kernel/tux3.h
--- a/user/kernel/tux3.h	Fri Jan 02 01:50:49 2009 -0800
+++ b/user/kernel/tux3.h	Sat Jan 03 20:26:12 2009 -0800
@@ -2,6 +2,7 @@
 #define TUX3_H
 
 #ifdef __KERNEL__
+#include <linux/version.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/time.h>

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list