Revision: 503
http://vde.svn.sourceforge.net/vde/?rev=503&view=rev
Author: rd235
Date: 2011-06-28 16:13:32 +0000 (Tue, 28 Jun 2011)
Log Message:
-----------
Support for kernel < 2.6.25 deleted.
Modified Paths:
--------------
trunk/ipn/README
trunk/ipn/af_ipn.c
trunk/ipn/ipn_chrdev.c
Modified: trunk/ipn/README
===================================================================
--- trunk/ipn/README 2011-06-18 10:58:22 UTC (rev 502)
+++ trunk/ipn/README 2011-06-28 16:13:32 UTC (rev 503)
@@ -1,4 +1,5 @@
Inter Process Networking (and Kernel Virtual Distributed Ethernet)
+for Linux Kernel 2.6.25 and newer
WHAT IS IT?
-----------
Modified: trunk/ipn/af_ipn.c
===================================================================
--- trunk/ipn/af_ipn.c 2011-06-18 10:58:22 UTC (rev 502)
+++ trunk/ipn/af_ipn.c 2011-06-28 16:13:32 UTC (rev 503)
@@ -41,9 +41,6 @@
MODULE_DESCRIPTION("IPN Kernel Module");
#define IPN_MAX_PROTO 4
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
-#define IPN_PRE2625
-#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
#define IPN_PRE2632
#endif
@@ -631,30 +628,16 @@
#else
mode = S_IFSOCK | (mode & ~current_umask());
#endif
-#ifndef IPN_PRE2625
#ifdef APPARMOR
err = vfs_mknod(nd.path.dentry->d_inode, dentry, nd.path.mnt,
mode, 0);
#else
err = vfs_mknod(nd.path.dentry->d_inode, dentry, mode, 0);
#endif
-#else
-#ifdef APPARMOR
- err = vfs_mknod(nd.dentry->d_inode, dentry, nd.path.mnt, mode,
0);
-#else
- err = vfs_mknod(nd.dentry->d_inode, dentry, mode, 0);
-#endif
-#endif
if (err)
goto out_mknod_dput;
-#ifndef IPN_PRE2625
mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
dput(nd.path.dentry);
nd.path.dentry = dentry;
-#else
- mutex_unlock(&nd.dentry->d_inode->i_mutex);
- dput(nd.dentry);
- nd.dentry = dentry;
-#endif
/* create a new ipn_network item */
if (ipn_node->pbp)
parms=*ipn_node->pbp;
@@ -690,13 +673,8 @@
INIT_LIST_HEAD(&ipnn->unconnectqueue);
INIT_LIST_HEAD(&ipnn->connectqueue);
ipnn->refcnt=0;
-#ifndef IPN_PRE2625
ipnn->dentry=nd.path.dentry;
ipnn->mnt=nd.path.mnt;
-#else
- ipnn->dentry=nd.dentry;
- ipnn->mnt=nd.mnt;
-#endif
sema_init(&ipnn->ipnn_mutex,1);
ipnn->sunaddr_len=addr_len;
ipnn->protocol=ipn_node->protocol;
@@ -713,11 +691,7 @@
err=ipn_protocol_table[ipnn->protocol]->ipn_p_newnet(ipnn);
if (err)
goto out_mknod_dput_putmodule;
-#ifndef IPN_PRE2625
ipn_insert_network(&ipn_network_table[nd.path.dentry->d_inode->i_ino &
(IPN_HASH_SIZE-1)],ipnn);
-#else
- ipn_insert_network(&ipn_network_table[nd.dentry->d_inode->i_ino
& (IPN_HASH_SIZE-1)],ipnn);
-#endif
} else {
/* join an existing network */
if (parms.flags & IPN_FLAG_EXCL) {
@@ -728,15 +702,9 @@
if (err)
goto put_fail;
err = -ECONNREFUSED;
-#ifndef IPN_PRE2625
if (!S_ISSOCK(nd.path.dentry->d_inode->i_mode))
goto put_fail;
ipnn=ipn_find_network_byinode(nd.path.dentry->d_inode);
-#else
- if (!S_ISSOCK(nd.dentry->d_inode->i_mode))
- goto put_fail;
- ipnn=ipn_find_network_byinode(nd.dentry->d_inode);
-#endif
if (!ipnn || (ipnn->flags & IPN_FLAG_TERMINATED) ||
(ipnn->flags & IPN_FLAG_EXCL))
goto put_fail;
@@ -750,11 +718,7 @@
return 0;
put_fail:
-#ifndef IPN_PRE2625
path_put(&nd.path);
-#else
- path_release(&nd);
-#endif
out:
up(&ipn_glob_mutex);
return err;
@@ -768,13 +732,8 @@
out_mknod_dput:
dput(dentry);
out_mknod_unlock:
-#ifndef IPN_PRE2625
mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
path_put(&nd.path);
-#else
- mutex_unlock(&nd.dentry->d_inode->i_mutex);
- path_release(&nd);
-#endif
out_mknod_parent:
if (err==-EEXIST)
err=-EADDRINUSE;
@@ -832,19 +791,11 @@
err=0;
ipn_node->shutdown=mustshutdown;
}
-#ifndef IPN_PRE2625
if (!S_ISSOCK(nd.path.dentry->d_inode->i_mode)) {
err = -ECONNREFUSED;
goto put_fail;
}
ipnn=ipn_find_network_byinode(nd.path.dentry->d_inode);
-#else
- if (!S_ISSOCK(nd.dentry->d_inode->i_mode)) {
- err = -ECONNREFUSED;
- goto put_fail;
- }
- ipnn=ipn_find_network_byinode(nd.dentry->d_inode);
-#endif
if (!ipnn || (ipnn->flags & IPN_FLAG_TERMINATED)) {
err = -ECONNREFUSED;
goto put_fail;
@@ -855,11 +806,7 @@
err = -EPROTO;
goto put_fail;
}
-#ifndef IPN_PRE2625
path_put(&nd.path);
-#else
- path_release(&nd);
-#endif
ipn_node->ipn=ipnn;
} else
ipnn=ipn_node->ipn;
@@ -890,11 +837,7 @@
return err;
put_fail:
-#ifndef IPN_PRE2625
path_put(&nd.path);
-#else
- path_release(&nd);
-#endif
out:
up(&ipn_glob_mutex);
return err;
Modified: trunk/ipn/ipn_chrdev.c
===================================================================
--- trunk/ipn/ipn_chrdev.c 2011-06-18 10:58:22 UTC (rev 502)
+++ trunk/ipn/ipn_chrdev.c 2011-06-28 16:13:32 UTC (rev 503)
@@ -161,7 +161,7 @@
{
unsigned int minor_count;
struct class *devclass;
- struct device *fdevice;
+ struct device *fdevice=NULL;
/* create a sysfs class for this device*/
if(IS_ERR(devclass=class_create(THIS_MODULE,devr->name)) )
return devclass;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
vde-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vde-users