提交 910d6c32 编写于 作者: P Pavel Emelyanov 提交者: David S. Miller

[GENETLINK]: Relax dances with genl_lock.

The genl_unregister_family() calls the genl_unregister_mc_groups(), 
which takes and releases the genl_lock and then locks and releases
this lock itself.

Relax this behavior, all the more so the genl_unregister_mc_groups() 
is called from genl_unregister_family() only.
Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4c3a0a25
...@@ -230,10 +230,8 @@ static void genl_unregister_mc_groups(struct genl_family *family) ...@@ -230,10 +230,8 @@ static void genl_unregister_mc_groups(struct genl_family *family)
{ {
struct genl_multicast_group *grp, *tmp; struct genl_multicast_group *grp, *tmp;
genl_lock();
list_for_each_entry_safe(grp, tmp, &family->mcast_groups, list) list_for_each_entry_safe(grp, tmp, &family->mcast_groups, list)
__genl_unregister_mc_group(family, grp); __genl_unregister_mc_group(family, grp);
genl_unlock();
} }
/** /**
...@@ -396,10 +394,10 @@ int genl_unregister_family(struct genl_family *family) ...@@ -396,10 +394,10 @@ int genl_unregister_family(struct genl_family *family)
{ {
struct genl_family *rc; struct genl_family *rc;
genl_unregister_mc_groups(family);
genl_lock(); genl_lock();
genl_unregister_mc_groups(family);
list_for_each_entry(rc, genl_family_chain(family->id), family_list) { list_for_each_entry(rc, genl_family_chain(family->id), family_list) {
if (family->id != rc->id || strcmp(rc->name, family->name)) if (family->id != rc->id || strcmp(rc->name, family->name))
continue; continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册