tipc: Introduce __tipc_nl_bearer_enable
Introduce __tipc_nl_bearer_enable() which doesn't hold RTNL lock. Signed-off-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d59d8b77ab
commit
45cf7edfbc
@@ -855,7 +855,7 @@ int tipc_nl_bearer_disable(struct sk_buff *skb, struct genl_info *info)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tipc_nl_bearer_enable(struct sk_buff *skb, struct genl_info *info)
|
int __tipc_nl_bearer_enable(struct sk_buff *skb, struct genl_info *info)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
char *bearer;
|
char *bearer;
|
||||||
@@ -897,15 +897,18 @@ int tipc_nl_bearer_enable(struct sk_buff *skb, struct genl_info *info)
|
|||||||
prio = nla_get_u32(props[TIPC_NLA_PROP_PRIO]);
|
prio = nla_get_u32(props[TIPC_NLA_PROP_PRIO]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return tipc_enable_bearer(net, bearer, domain, prio, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
int tipc_nl_bearer_enable(struct sk_buff *skb, struct genl_info *info)
|
||||||
|
{
|
||||||
|
int err;
|
||||||
|
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
err = tipc_enable_bearer(net, bearer, domain, prio, attrs);
|
err = __tipc_nl_bearer_enable(skb, info);
|
||||||
if (err) {
|
|
||||||
rtnl_unlock();
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
rtnl_unlock();
|
rtnl_unlock();
|
||||||
|
|
||||||
return 0;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int tipc_nl_bearer_add(struct sk_buff *skb, struct genl_info *info)
|
int tipc_nl_bearer_add(struct sk_buff *skb, struct genl_info *info)
|
||||||
|
@@ -190,6 +190,7 @@ extern struct tipc_media udp_media_info;
|
|||||||
int tipc_nl_bearer_disable(struct sk_buff *skb, struct genl_info *info);
|
int tipc_nl_bearer_disable(struct sk_buff *skb, struct genl_info *info);
|
||||||
int __tipc_nl_bearer_disable(struct sk_buff *skb, struct genl_info *info);
|
int __tipc_nl_bearer_disable(struct sk_buff *skb, struct genl_info *info);
|
||||||
int tipc_nl_bearer_enable(struct sk_buff *skb, struct genl_info *info);
|
int tipc_nl_bearer_enable(struct sk_buff *skb, struct genl_info *info);
|
||||||
|
int __tipc_nl_bearer_enable(struct sk_buff *skb, struct genl_info *info);
|
||||||
int tipc_nl_bearer_dump(struct sk_buff *skb, struct netlink_callback *cb);
|
int tipc_nl_bearer_dump(struct sk_buff *skb, struct netlink_callback *cb);
|
||||||
int tipc_nl_bearer_get(struct sk_buff *skb, struct genl_info *info);
|
int tipc_nl_bearer_get(struct sk_buff *skb, struct genl_info *info);
|
||||||
int tipc_nl_bearer_set(struct sk_buff *skb, struct genl_info *info);
|
int tipc_nl_bearer_set(struct sk_buff *skb, struct genl_info *info);
|
||||||
|
Reference in New Issue
Block a user