Source-Changes-HG archive

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

[src/trunk]: src/sys/opencrypto opencrypto: Factor setting CRYPTO_F_DONE out ...



details:   https://anonhg.NetBSD.org/src/rev/dfd88d03b2d0
branches:  trunk
changeset: 366180:dfd88d03b2d0
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue May 17 10:32:58 2022 +0000

description:
opencrypto: Factor setting CRYPTO_F_DONE out of branches.

This had been done in 1.30 when the locking was different.  No need
any more.  No functional change intended.

diffstat:

 sys/opencrypto/crypto.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (44 lines):

diff -r ba9566829a61 -r dfd88d03b2d0 sys/opencrypto/crypto.c
--- a/sys/opencrypto/crypto.c   Tue May 17 10:28:08 2022 +0000
+++ b/sys/opencrypto/crypto.c   Tue May 17 10:32:58 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: crypto.c,v 1.116 2021/08/14 20:43:05 andvar Exp $ */
+/*     $NetBSD: crypto.c,v 1.117 2022/05/17 10:32:58 riastradh Exp $ */
 /*     $FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $   */
 /*     $OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $ */
 
@@ -53,7 +53,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.116 2021/08/14 20:43:05 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.117 2022/05/17 10:32:58 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/reboot.h>
@@ -1718,6 +1718,8 @@
 #endif
        DPRINTF("lid[%u]: crp %p\n", CRYPTO_SESID2LID(crp->crp_sid), crp);
 
+       crp->crp_flags |= CRYPTO_F_DONE;
+
        /*
         * Normal case; queue the callback for the thread.
         *
@@ -1732,8 +1734,6 @@
                * callback routine does very little (e.g. the
                * /dev/crypto callback method just does a wakeup).
                */
-               crp->crp_flags |= CRYPTO_F_DONE;
-
 #ifdef CRYPTO_TIMING
                if (crypto_timing) {
                        /*
@@ -1749,7 +1749,6 @@
 #endif
                crp->crp_callback(crp);
        } else {
-               crp->crp_flags |= CRYPTO_F_DONE;
 #if 0
                if (crp->crp_flags & CRYPTO_F_USER) {
                        /*



Home | Main Index | Thread Index | Old Index