Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net No need to wrap the call to if_detach with splnet / ...



details:   https://anonhg.NetBSD.org/src/rev/fc3f0dd459de
branches:  trunk
changeset: 368709:fc3f0dd459de
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Jul 29 15:25:51 2022 +0000

description:
No need to wrap the call to if_detach with splnet / splx as if_detach
raises spl as required.

diffstat:

 sys/net/if_mpls.c |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (32 lines):

diff -r fcc553e4abd2 -r fc3f0dd459de sys/net/if_mpls.c
--- a/sys/net/if_mpls.c Fri Jul 29 15:24:28 2022 +0000
+++ b/sys/net/if_mpls.c Fri Jul 29 15:25:51 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_mpls.c,v 1.37 2021/06/16 00:21:19 riastradh Exp $ */
+/*     $NetBSD: if_mpls.c,v 1.38 2022/07/29 15:25:51 skrll Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mpls.c,v 1.37 2021/06/16 00:21:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mpls.c,v 1.38 2022/07/29 15:25:51 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -164,13 +164,9 @@
 static int
 mpls_clone_destroy(struct ifnet *ifp)
 {
-       int s;
 
        bpf_detach(ifp);
-
-       s = splnet();
        if_detach(ifp);
-       splx(s);
 
        free(ifp->if_softc, M_DEVBUF);
        atomic_dec_uint(&mpls_count);



Home | Main Index | Thread Index | Old Index