mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
synced 2025-09-29 04:09:20 +10:00
tipc: Introduce __tipc_nl_bearer_disable
Introduce __tipc_nl_bearer_disable() 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:
parent
e5d1a1eec0
commit
d59d8b77ab
@ -813,7 +813,7 @@ err_out:
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
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 err;
|
int err;
|
||||||
char *name;
|
char *name;
|
||||||
@ -835,19 +835,26 @@ int tipc_nl_bearer_disable(struct sk_buff *skb, struct genl_info *info)
|
|||||||
|
|
||||||
name = nla_data(attrs[TIPC_NLA_BEARER_NAME]);
|
name = nla_data(attrs[TIPC_NLA_BEARER_NAME]);
|
||||||
|
|
||||||
rtnl_lock();
|
|
||||||
bearer = tipc_bearer_find(net, name);
|
bearer = tipc_bearer_find(net, name);
|
||||||
if (!bearer) {
|
if (!bearer)
|
||||||
rtnl_unlock();
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
|
||||||
|
|
||||||
bearer_disable(net, bearer);
|
bearer_disable(net, bearer);
|
||||||
rtnl_unlock();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int tipc_nl_bearer_disable(struct sk_buff *skb, struct genl_info *info)
|
||||||
|
{
|
||||||
|
int err;
|
||||||
|
|
||||||
|
rtnl_lock();
|
||||||
|
err = __tipc_nl_bearer_disable(skb, info);
|
||||||
|
rtnl_unlock();
|
||||||
|
|
||||||
|
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;
|
||||||
|
@ -188,6 +188,7 @@ extern struct tipc_media udp_media_info;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
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_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);
|
||||||
|
Loading…
Reference in New Issue
Block a user