git: 27202b98dc2d - main - jail: Use atomic(9) instead of CK atomics

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Tue, 07 Feb 2023 20:11:48 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=27202b98dc2d3361f4b5395a93488fc60c3f9af9

commit 27202b98dc2d3361f4b5395a93488fc60c3f9af9
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-02-07 19:35:44 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-02-07 20:10:24 +0000

    jail: Use atomic(9) instead of CK atomics
    
    There's no reason to use one over the other here, let's prefer the
    interface that's used elsewhere in the kernel.
    
    No functional change intended.
    
    Reviewed by:    mjg
    Sponsored by:   Klara, Inc.
    Differential Revision:  https://reviews.freebsd.org/D38360
---
 sys/kern/kern_jail.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c
index 4c1e3ff40c58..75be0df85448 100644
--- a/sys/kern/kern_jail.c
+++ b/sys/kern/kern_jail.c
@@ -771,7 +771,7 @@ prison_ip_set(struct prison *pr, const pr_family_t af, struct prison_ip *new)
 	mem = &pr->pr_addrs[af];
 
 	old = *mem;
-	ck_pr_store_ptr(mem, new);
+	atomic_store_ptr(mem, new);
 	prison_ip_free(old);
 }
 
@@ -897,7 +897,7 @@ prison_ip_check(const struct prison *pr, const pr_family_t af,
 	    in_epoch(net_epoch_preempt) ||
 	    sx_xlocked(&allprison_lock));
 
-	pip = ck_pr_load_ptr(&pr->pr_addrs[af]);
+	pip = atomic_load_ptr(&pr->pr_addrs[af]);
 	if (__predict_false(pip == NULL))
 		return (EAFNOSUPPORT);