[ovs-dev,net-next] net: openvswitch: remove unnecessary ASSERT_OVSL in ovs_vport_del()
diff mbox series

Message ID 20190609171906.30314-1-ap420073@gmail.com
State New
Headers show
Series
  • [ovs-dev,net-next] net: openvswitch: remove unnecessary ASSERT_OVSL in ovs_vport_del()
Related show

Commit Message

Taehee Yoo June 9, 2019, 5:19 p.m. UTC
ASSERT_OVSL() in ovs_vport_del() is unnecessary because
ovs_vport_del() is only called by ovs_dp_detach_port() and
ovs_dp_detach_port() calls ASSERT_OVSL() too.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
 net/openvswitch/vport.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Gregory Rose June 10, 2019, 9:13 p.m. UTC | #1
On 6/9/2019 10:19 AM, Taehee Yoo wrote:
> ASSERT_OVSL() in ovs_vport_del() is unnecessary because
> ovs_vport_del() is only called by ovs_dp_detach_port() and
> ovs_dp_detach_port() calls ASSERT_OVSL() too.
>
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>
> ---
>   net/openvswitch/vport.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
> index 258ce3b7b452..9e71f1a601a9 100644
> --- a/net/openvswitch/vport.c
> +++ b/net/openvswitch/vport.c
> @@ -261,8 +261,6 @@ int ovs_vport_set_options(struct vport *vport, struct nlattr *options)
>    */
>   void ovs_vport_del(struct vport *vport)
>   {
> -	ASSERT_OVSL();
> -
>   	hlist_del_rcu(&vport->hash_node);
>   	module_put(vport->ops->owner);
>   	vport->ops->destroy(vport);

LGTM
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
David Miller June 11, 2019, 6:56 p.m. UTC | #2
From: Taehee Yoo <ap420073@gmail.com>
Date: Mon, 10 Jun 2019 02:19:06 +0900

> ASSERT_OVSL() in ovs_vport_del() is unnecessary because
> ovs_vport_del() is only called by ovs_dp_detach_port() and
> ovs_dp_detach_port() calls ASSERT_OVSL() too.
> 
> Signed-off-by: Taehee Yoo <ap420073@gmail.com>

Applied.

Patch
diff mbox series

diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 258ce3b7b452..9e71f1a601a9 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -261,8 +261,6 @@  int ovs_vport_set_options(struct vport *vport, struct nlattr *options)
  */
 void ovs_vport_del(struct vport *vport)
 {
-	ASSERT_OVSL();
-
 	hlist_del_rcu(&vport->hash_node);
 	module_put(vport->ops->owner);
 	vport->ops->destroy(vport);