Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62790
b: refs/heads/master
c: 79dc438
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Graf authored and David S. Miller committed Jul 24, 2007
1 parent f8c98dd commit 7f2b03d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85ccc365e91de9f0053c94de4cbc6ce97f8170e7
refs/heads/master: 79dc4386aec655ad829f320ab90888bacbc7037b
24 changes: 16 additions & 8 deletions trunk/net/netlink/genetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,18 @@ int genl_register_mc_group(struct genl_family *family,
}
EXPORT_SYMBOL(genl_register_mc_group);

static void __genl_unregister_mc_group(struct genl_family *family,
struct genl_multicast_group *grp)
{
BUG_ON(grp->family != family);
netlink_clear_multicast_users(genl_sock, grp->id);
clear_bit(grp->id, mc_groups);
list_del(&grp->list);
genl_ctrl_event(CTRL_CMD_DELMCAST_GRP, grp);
grp->id = 0;
grp->family = NULL;
}

/**
* genl_unregister_mc_group - unregister a multicast group
*
Expand All @@ -217,23 +229,19 @@ EXPORT_SYMBOL(genl_register_mc_group);
void genl_unregister_mc_group(struct genl_family *family,
struct genl_multicast_group *grp)
{
BUG_ON(grp->family != family);
genl_lock();
netlink_clear_multicast_users(genl_sock, grp->id);
clear_bit(grp->id, mc_groups);
list_del(&grp->list);
genl_ctrl_event(CTRL_CMD_DELMCAST_GRP, grp);
grp->id = 0;
grp->family = NULL;
__genl_unregister_mc_group(family, grp);
genl_unlock();
}

static void genl_unregister_mc_groups(struct genl_family *family)
{
struct genl_multicast_group *grp, *tmp;

genl_lock();
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();
}

/**
Expand Down

0 comments on commit 7f2b03d

Please sign in to comment.