lkml.org 
[lkml]   [2020]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next] xfrm: policy: Remove obsolete WARN while xfrm policy inserting
Date
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

\
 
 \ /
  Last update: 2020-03-27 13:39    [W:0.131 / U:2.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site