Messages in this thread Patch in this message | | | From | YueHaibing <> | Subject | [PATCH net-next] xfrm: policy: Remove obsolete WARN while xfrm policy inserting | Date | Fri, 27 Mar 2020 20:34:43 +0800 |
| |
Since commit 7cb8a93968e3 ("xfrm: Allow inserting policies with matching mark and different priorities"), we allow duplicate policies with different priority, this WARN is not needed any more.
Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- net/xfrm/xfrm_policy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index dbda08e..5c4387c 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -1508,7 +1508,7 @@ static void xfrm_policy_insert_inexact_list(struct hlist_head *chain, !selector_cmp(&pol->selector, &policy->selector) && xfrm_policy_mark_match(policy, pol) && xfrm_sec_ctx_match(pol->security, policy->security) && - !WARN_ON(delpol)) { + !delpol) { delpol = pol; if (policy->priority > pol->priority) continue; @@ -1543,7 +1543,7 @@ static struct xfrm_policy *xfrm_policy_insert_list(struct hlist_head *chain, !selector_cmp(&pol->selector, &policy->selector) && xfrm_policy_mark_match(policy, pol) && xfrm_sec_ctx_match(pol->security, policy->security) && - !WARN_ON(delpol)) { + !delpol) { if (excl) return ERR_PTR(-EEXIST); delpol = pol; -- 1.8.3.1
| |