]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.fixes/bridge-module-get-put.patch
Imported linux-2.6.27.39 suse/xen patches.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / bridge-module-get-put.patch
diff --git a/src/patches/suse-2.6.27.31/patches.fixes/bridge-module-get-put.patch b/src/patches/suse-2.6.27.31/patches.fixes/bridge-module-get-put.patch
deleted file mode 100644 (file)
index 82f0fe4..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-From: jbeulich@novell.com
-Subject: Module use count must be updated as bridges are created/destroyed
-Patch-mainline: unknown
-References: 267651
-
-Otherwise 'modprobe -r' on a module having a dependency on bridge will
-implicitly unload bridge, bringing down all connectivity that was using
-bridges.
-
----
- net/bridge/br_if.c |    9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/net/bridge/br_if.c
-+++ b/net/bridge/br_if.c
-@@ -271,6 +271,11 @@ int br_add_bridge(const char *name)
-       if (!dev)
-               return -ENOMEM;
-+      if (!try_module_get(THIS_MODULE)) {
-+              free_netdev(dev);
-+              return -ENOENT;
-+      }
-+
-       rtnl_lock();
-       if (strchr(dev->name, '%')) {
-               ret = dev_alloc_name(dev, dev->name);
-@@ -287,6 +292,8 @@ int br_add_bridge(const char *name)
-               unregister_netdevice(dev);
-  out:
-       rtnl_unlock();
-+      if (ret)
-+              module_put(THIS_MODULE);
-       return ret;
- out_free:
-@@ -318,6 +325,8 @@ int br_del_bridge(const char *name)
-               del_br(netdev_priv(dev));
-       rtnl_unlock();
-+      if (ret == 0)
-+              module_put(THIS_MODULE);
-       return ret;
- }