diff options
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 0cc3d9015c5d..b02a6dc4efe4 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -97,8 +97,7 @@ static int link_recv_changeover_msg(struct tipc_link **l_ptr, | |||
97 | static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance); | 97 | static void link_set_supervision_props(struct tipc_link *l_ptr, u32 tolerance); |
98 | static int link_send_sections_long(struct tipc_port *sender, | 98 | static int link_send_sections_long(struct tipc_port *sender, |
99 | struct iovec const *msg_sect, | 99 | struct iovec const *msg_sect, |
100 | u32 num_sect, unsigned int total_len, | 100 | unsigned int len, u32 destnode); |
101 | u32 destnode); | ||
102 | static void link_state_event(struct tipc_link *l_ptr, u32 event); | 101 | static void link_state_event(struct tipc_link *l_ptr, u32 event); |
103 | static void link_reset_statistics(struct tipc_link *l_ptr); | 102 | static void link_reset_statistics(struct tipc_link *l_ptr); |
104 | static void link_print(struct tipc_link *l_ptr, const char *str); | 103 | static void link_print(struct tipc_link *l_ptr, const char *str); |
@@ -1065,8 +1064,7 @@ static int link_send_buf_fast(struct tipc_link *l_ptr, struct sk_buff *buf, | |||
1065 | */ | 1064 | */ |
1066 | int tipc_link_send_sections_fast(struct tipc_port *sender, | 1065 | int tipc_link_send_sections_fast(struct tipc_port *sender, |
1067 | struct iovec const *msg_sect, | 1066 | struct iovec const *msg_sect, |
1068 | const u32 num_sect, unsigned int total_len, | 1067 | unsigned int len, u32 destaddr) |
1069 | u32 destaddr) | ||
1070 | { | 1068 | { |
1071 | struct tipc_msg *hdr = &sender->phdr; | 1069 | struct tipc_msg *hdr = &sender->phdr; |
1072 | struct tipc_link *l_ptr; | 1070 | struct tipc_link *l_ptr; |
@@ -1080,8 +1078,7 @@ again: | |||
1080 | * Try building message using port's max_pkt hint. | 1078 | * Try building message using port's max_pkt hint. |
1081 | * (Must not hold any locks while building message.) | 1079 | * (Must not hold any locks while building message.) |
1082 | */ | 1080 | */ |
1083 | res = tipc_msg_build(hdr, msg_sect, num_sect, total_len, | 1081 | res = tipc_msg_build(hdr, msg_sect, len, sender->max_pkt, &buf); |
1084 | sender->max_pkt, &buf); | ||
1085 | /* Exit if build request was invalid */ | 1082 | /* Exit if build request was invalid */ |
1086 | if (unlikely(res < 0)) | 1083 | if (unlikely(res < 0)) |
1087 | return res; | 1084 | return res; |
@@ -1121,8 +1118,7 @@ exit: | |||
1121 | if ((msg_hdr_sz(hdr) + res) <= sender->max_pkt) | 1118 | if ((msg_hdr_sz(hdr) + res) <= sender->max_pkt) |
1122 | goto again; | 1119 | goto again; |
1123 | 1120 | ||
1124 | return link_send_sections_long(sender, msg_sect, | 1121 | return link_send_sections_long(sender, msg_sect, len, |
1125 | num_sect, total_len, | ||
1126 | destaddr); | 1122 | destaddr); |
1127 | } | 1123 | } |
1128 | tipc_node_unlock(node); | 1124 | tipc_node_unlock(node); |
@@ -1133,8 +1129,8 @@ exit: | |||
1133 | if (buf) | 1129 | if (buf) |
1134 | return tipc_reject_msg(buf, TIPC_ERR_NO_NODE); | 1130 | return tipc_reject_msg(buf, TIPC_ERR_NO_NODE); |
1135 | if (res >= 0) | 1131 | if (res >= 0) |
1136 | return tipc_port_reject_sections(sender, hdr, msg_sect, num_sect, | 1132 | return tipc_port_reject_sections(sender, hdr, msg_sect, |
1137 | total_len, TIPC_ERR_NO_NODE); | 1133 | len, TIPC_ERR_NO_NODE); |
1138 | return res; | 1134 | return res; |
1139 | } | 1135 | } |
1140 | 1136 | ||
@@ -1154,13 +1150,12 @@ exit: | |||
1154 | */ | 1150 | */ |
1155 | static int link_send_sections_long(struct tipc_port *sender, | 1151 | static int link_send_sections_long(struct tipc_port *sender, |
1156 | struct iovec const *msg_sect, | 1152 | struct iovec const *msg_sect, |
1157 | u32 num_sect, unsigned int total_len, | 1153 | unsigned int len, u32 destaddr) |
1158 | u32 destaddr) | ||
1159 | { | 1154 | { |
1160 | struct tipc_link *l_ptr; | 1155 | struct tipc_link *l_ptr; |
1161 | struct tipc_node *node; | 1156 | struct tipc_node *node; |
1162 | struct tipc_msg *hdr = &sender->phdr; | 1157 | struct tipc_msg *hdr = &sender->phdr; |
1163 | u32 dsz = total_len; | 1158 | u32 dsz = len; |
1164 | u32 max_pkt, fragm_sz, rest; | 1159 | u32 max_pkt, fragm_sz, rest; |
1165 | struct tipc_msg fragm_hdr; | 1160 | struct tipc_msg fragm_hdr; |
1166 | struct sk_buff *buf, *buf_chain, *prev; | 1161 | struct sk_buff *buf, *buf_chain, *prev; |
@@ -1283,8 +1278,8 @@ reject: | |||
1283 | buf = buf_chain->next; | 1278 | buf = buf_chain->next; |
1284 | kfree_skb(buf_chain); | 1279 | kfree_skb(buf_chain); |
1285 | } | 1280 | } |
1286 | return tipc_port_reject_sections(sender, hdr, msg_sect, num_sect, | 1281 | return tipc_port_reject_sections(sender, hdr, msg_sect, |
1287 | total_len, TIPC_ERR_NO_NODE); | 1282 | len, TIPC_ERR_NO_NODE); |
1288 | } | 1283 | } |
1289 | 1284 | ||
1290 | /* Append chain of fragments to send queue & send them */ | 1285 | /* Append chain of fragments to send queue & send them */ |