diff options
Diffstat (limited to 'net/tipc/config.c')
| -rw-r--r-- | net/tipc/config.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/tipc/config.c b/net/tipc/config.c index 4b981c053823..2b42403ad33a 100644 --- a/net/tipc/config.c +++ b/net/tipc/config.c | |||
| @@ -42,8 +42,6 @@ | |||
| 42 | 42 | ||
| 43 | #define REPLY_TRUNCATED "<truncated>\n" | 43 | #define REPLY_TRUNCATED "<truncated>\n" |
| 44 | 44 | ||
| 45 | static DEFINE_MUTEX(config_mutex); | ||
| 46 | |||
| 47 | static const void *req_tlv_area; /* request message TLV area */ | 45 | static const void *req_tlv_area; /* request message TLV area */ |
| 48 | static int req_tlv_space; /* request message TLV area size */ | 46 | static int req_tlv_space; /* request message TLV area size */ |
| 49 | static int rep_headroom; /* reply message headroom to use */ | 47 | static int rep_headroom; /* reply message headroom to use */ |
| @@ -179,8 +177,10 @@ static struct sk_buff *cfg_set_own_addr(void) | |||
| 179 | if (tipc_own_addr) | 177 | if (tipc_own_addr) |
| 180 | return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED | 178 | return tipc_cfg_reply_error_string(TIPC_CFG_NOT_SUPPORTED |
| 181 | " (cannot change node address once assigned)"); | 179 | " (cannot change node address once assigned)"); |
| 182 | tipc_net_start(addr); | 180 | if (!tipc_net_start(addr)) |
| 183 | return tipc_cfg_reply_none(); | 181 | return tipc_cfg_reply_none(); |
| 182 | |||
| 183 | return tipc_cfg_reply_error_string("cannot change to network mode"); | ||
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | static struct sk_buff *cfg_set_max_ports(void) | 186 | static struct sk_buff *cfg_set_max_ports(void) |
| @@ -223,7 +223,7 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area | |||
| 223 | { | 223 | { |
| 224 | struct sk_buff *rep_tlv_buf; | 224 | struct sk_buff *rep_tlv_buf; |
| 225 | 225 | ||
| 226 | mutex_lock(&config_mutex); | 226 | rtnl_lock(); |
| 227 | 227 | ||
| 228 | /* Save request and reply details in a well-known location */ | 228 | /* Save request and reply details in a well-known location */ |
| 229 | req_tlv_area = request_area; | 229 | req_tlv_area = request_area; |
| @@ -337,6 +337,6 @@ struct sk_buff *tipc_cfg_do_cmd(u32 orig_node, u16 cmd, const void *request_area | |||
| 337 | 337 | ||
| 338 | /* Return reply buffer */ | 338 | /* Return reply buffer */ |
| 339 | exit: | 339 | exit: |
| 340 | mutex_unlock(&config_mutex); | 340 | rtnl_unlock(); |
| 341 | return rep_tlv_buf; | 341 | return rep_tlv_buf; |
| 342 | } | 342 | } |
