[Ocfs2-commits] zab commits r2325 - in trunk: . fs/ocfs2/cluster

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed May 25 17:41:02 CDT 2005


Author: zab
Signed-off-by: manish
Date: 2005-05-25 17:41:01 -0500 (Wed, 25 May 2005)
New Revision: 2325

Modified:
   trunk/Config.make.in
   trunk/configure.in
   trunk/fs/ocfs2/cluster/Makefile
   trunk/fs/ocfs2/cluster/net_proc.c
Log:
o fix the recent net_proc commit to build against distro 2.6 vintages

Signed-off-by: manish


Modified: trunk/Config.make.in
===================================================================
--- trunk/Config.make.in	2005-05-25 22:16:11 UTC (rev 2324)
+++ trunk/Config.make.in	2005-05-25 22:41:01 UTC (rev 2325)
@@ -54,6 +54,7 @@
 JOURNAL_ACCESS_WITH_CREDITS = @JOURNAL_ACCESS_WITH_CREDITS@
 BACKING_DEV_CAPABILITIES = @BACKING_DEV_CAPABILITIES@
 IDR_GET_NEW_RETURNS_ID = @IDR_GET_NEW_RETURNS_ID@
+INET_SK_RETURNS_INET_OPT = @INET_SK_RETURNS_INET_OPT@
 
 OCFS_DEBUG = @OCFS_DEBUG@
 

Modified: trunk/configure.in
===================================================================
--- trunk/configure.in	2005-05-25 22:16:11 UTC (rev 2324)
+++ trunk/configure.in	2005-05-25 22:41:01 UTC (rev 2325)
@@ -235,6 +235,11 @@
   IDR_GET_NEW_RETURNS_ID=yes, , [int idr_get_new(struct idr \*idp, void \*ptr);])
 AC_SUBST(IDR_GET_NEW_RETURNS_ID)
 
+INET_SK_RETURNS_INET_OPT=
+OCFS2_CHECK_KERNEL([for inet_sk() that returns struct inet_opt], ip.h,
+  INET_SK_RETURNS_INET_OPT=yes, , [struct inet_opt \* inet_sk])
+AC_SUBST(INET_SK_RETURNS_INET_OPT)
+
 # using -include has two advantages:
 #  the source doesn't need to know to include compat headers
 #  the compat header file names don't go through the search path

Modified: trunk/fs/ocfs2/cluster/Makefile
===================================================================
--- trunk/fs/ocfs2/cluster/Makefile	2005-05-25 22:16:11 UTC (rev 2324)
+++ trunk/fs/ocfs2/cluster/Makefile	2005-05-25 22:41:01 UTC (rev 2325)
@@ -20,6 +20,10 @@
 EXTRA_CFLAGS += -DIDR_GET_NEW_RETURNS_ID
 endif
 
+ifdef INET_SK_RETURNS_INET_OPT
+EXTRA_CFLAGS += -DINET_SK_RETURNS_INET_OPT
+endif
+
 # this is going to get exciting if configfs is merged
 EXTRA_CFLAGS += -I$(OUR_TOPDIR)/fs/configfs/
 

Modified: trunk/fs/ocfs2/cluster/net_proc.c
===================================================================
--- trunk/fs/ocfs2/cluster/net_proc.c	2005-05-25 22:16:11 UTC (rev 2324)
+++ trunk/fs/ocfs2/cluster/net_proc.c	2005-05-25 22:41:01 UTC (rev 2325)
@@ -36,6 +36,7 @@
 #include <linux/file.h>
 #include <linux/kthread.h>
 #include <linux/kref.h>
+#include <linux/seq_file.h>
 
 #include <asm/uaccess.h>
 
@@ -46,7 +47,7 @@
 
 #include "tcp_internal.h"
 
-static DEFINE_SPINLOCK(net_proc_lock);
+static spinlock_t net_proc_lock = SPIN_LOCK_UNLOCKED;
 
 static LIST_HEAD(sock_containers);
 static LIST_HEAD(send_tracking);
@@ -271,7 +272,12 @@
 	sc = next_sc(dummy_sc);
 
 	if (sc != NULL) {
+/* netdev 1, world 0 */
+#ifdef INET_SK_RETURNS_INET_OPT 
+		struct inet_opt *inet = NULL;
+#else
 		struct inet_sock *inet = NULL;
+#endif
 		u32 saddr = 0, daddr = 0;
 
 		if (sc->sc_sock)



More information about the Ocfs2-commits mailing list