]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/x25/af_x25.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
[karo-tx-linux.git] / net / x25 / af_x25.c
index bcb091f713ec0899a07bde24c722d32d22c3baa2..9fc5b023d1118a990944cbe32ff5ab2c81e07f5b 100644 (file)
@@ -191,7 +191,7 @@ static int x25_device_event(struct notifier_block *this, unsigned long event,
        struct net_device *dev = ptr;
        struct x25_neigh *nb;
 
-       if (dev_net(dev) != &init_net)
+       if (!net_eq(dev_net(dev), &init_net))
                return NOTIFY_DONE;
 
        if (dev->type == ARPHRD_X25
@@ -612,8 +612,7 @@ static int x25_release(struct socket *sock)
                        break;
        }
 
-       sock->sk        = NULL;
-       sk->sk_socket   = NULL; /* Not used, but we should do this */
+       sock_orphan(sk);
 out:
        return 0;
 }