include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / infiniband / ulp / ipoib / ipoib_vlan.c
index 4c57f32..d7e9740 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/module.h>
 
 #include <linux/init.h>
-#include <linux/slab.h>
 #include <linux/seq_file.h>
 
 #include <asm/uaccess.h>
@@ -61,7 +60,8 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey)
 
        ppriv = netdev_priv(pdev);
 
-       rtnl_lock();
+       if (!rtnl_trylock())
+               return restart_syscall();
        mutex_lock(&ppriv->vlan_mutex);
 
        /*
@@ -167,7 +167,8 @@ int ipoib_vlan_delete(struct net_device *pdev, unsigned short pkey)
 
        ppriv = netdev_priv(pdev);
 
-       rtnl_lock();
+       if (!rtnl_trylock())
+               return restart_syscall();
        mutex_lock(&ppriv->vlan_mutex);
        list_for_each_entry_safe(priv, tpriv, &ppriv->child_intfs, list) {
                if (priv->pkey == pkey) {