diff options
Diffstat (limited to 'net/ipv4/tcp_metrics.c')
-rw-r--r-- | net/ipv4/tcp_metrics.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c index 461c3d2e1ca4..0d07e14f2ca5 100644 --- a/net/ipv4/tcp_metrics.c +++ b/net/ipv4/tcp_metrics.c | |||
@@ -1043,7 +1043,7 @@ out_free: | |||
1043 | 1043 | ||
1044 | #define deref_genl(p) rcu_dereference_protected(p, lockdep_genl_is_held()) | 1044 | #define deref_genl(p) rcu_dereference_protected(p, lockdep_genl_is_held()) |
1045 | 1045 | ||
1046 | static int tcp_metrics_flush_all(struct net *net) | 1046 | static void tcp_metrics_flush_all(struct net *net) |
1047 | { | 1047 | { |
1048 | unsigned int max_rows = 1U << net->ipv4.tcp_metrics_hash_log; | 1048 | unsigned int max_rows = 1U << net->ipv4.tcp_metrics_hash_log; |
1049 | struct tcpm_hash_bucket *hb = net->ipv4.tcp_metrics_hash; | 1049 | struct tcpm_hash_bucket *hb = net->ipv4.tcp_metrics_hash; |
@@ -1064,7 +1064,6 @@ static int tcp_metrics_flush_all(struct net *net) | |||
1064 | tm = next; | 1064 | tm = next; |
1065 | } | 1065 | } |
1066 | } | 1066 | } |
1067 | return 0; | ||
1068 | } | 1067 | } |
1069 | 1068 | ||
1070 | static int tcp_metrics_nl_cmd_del(struct sk_buff *skb, struct genl_info *info) | 1069 | static int tcp_metrics_nl_cmd_del(struct sk_buff *skb, struct genl_info *info) |
@@ -1081,8 +1080,10 @@ static int tcp_metrics_nl_cmd_del(struct sk_buff *skb, struct genl_info *info) | |||
1081 | ret = parse_nl_addr(info, &daddr, &hash, 1); | 1080 | ret = parse_nl_addr(info, &daddr, &hash, 1); |
1082 | if (ret < 0) | 1081 | if (ret < 0) |
1083 | return ret; | 1082 | return ret; |
1084 | if (ret > 0) | 1083 | if (ret > 0) { |
1085 | return tcp_metrics_flush_all(net); | 1084 | tcp_metrics_flush_all(net); |
1085 | return 0; | ||
1086 | } | ||
1086 | ret = parse_nl_saddr(info, &saddr); | 1087 | ret = parse_nl_saddr(info, &saddr); |
1087 | if (ret < 0) | 1088 | if (ret < 0) |
1088 | src = false; | 1089 | src = false; |