datapath: Allow the number of hash entries to exceed TBL_MAX_BUCKETS
[openvswitch] / datapath / datapath.c
index a964c27f469e3618d854f47ff9da9068c40ea900..3ec5be4e3bf55b0c7a554c51788b6f6740acb59b 100644 (file)
@@ -629,11 +629,13 @@ static int expand_table(struct datapath *dp)
        struct tbl *new_table;
 
        new_table = tbl_expand(old_table);
-       if (IS_ERR(new_table))
-               return PTR_ERR(new_table);
-
-       rcu_assign_pointer(dp->table, new_table);
-       tbl_deferred_destroy(old_table, NULL);
+       if (IS_ERR(new_table)) {
+               if (PTR_ERR(new_table) != -ENOSPC)
+                       return PTR_ERR(new_table);
+       } else {
+               rcu_assign_pointer(dp->table, new_table);
+               tbl_deferred_destroy(old_table, NULL);
+       }
 
        return 0;
 }