提交 3282aea9 编写于 作者: P Pavel Emelyanov 提交者: John W. Linville

mac80211: Do not report false error from mesh_path_add.

In case the hash grow failed, it is not fair to return error -
the new node _was_ _actually_ added in this case.

Besides, after my previous patch, this grow is more likely
to fail on large hashes.
Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 8566dc3f
...@@ -206,7 +206,7 @@ int mesh_path_add(u8 *dst, struct net_device *dev) ...@@ -206,7 +206,7 @@ int mesh_path_add(u8 *dst, struct net_device *dev)
newtbl = mesh_table_grow(mesh_paths); newtbl = mesh_table_grow(mesh_paths);
if (!newtbl) { if (!newtbl) {
write_unlock(&pathtbl_resize_lock); write_unlock(&pathtbl_resize_lock);
return -ENOMEM; return 0;
} }
rcu_assign_pointer(mesh_paths, newtbl); rcu_assign_pointer(mesh_paths, newtbl);
write_unlock(&pathtbl_resize_lock); write_unlock(&pathtbl_resize_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册