git: c9a995994b40 - main - seqc: rename seqc_consistent_nomb to seqc_consistent_no_fence

From: Mateusz Guzik <mjg_at_FreeBSD.org>
Date: Tue, 15 Feb 2022 17:51:31 UTC
The branch main has been updated by mjg:

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

commit c9a995994b40966c44e4c7eeb5b3024c326e6b25
Author:     Mateusz Guzik <mjg@FreeBSD.org>
AuthorDate: 2022-02-14 18:50:37 +0000
Commit:     Mateusz Guzik <mjg@FreeBSD.org>
CommitDate: 2022-02-15 17:51:07 +0000

    seqc: rename seqc_consistent_nomb to seqc_consistent_no_fence
    
    For more consistency with other primitives.
---
 sys/compat/linuxkpi/common/include/linux/seqlock.h | 2 +-
 sys/kern/kern_descrip.c                            | 6 +++---
 sys/sys/seqc.h                                     | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/seqlock.h b/sys/compat/linuxkpi/common/include/linux/seqlock.h
index 03d36d89de89..6f0618d7ac9d 100644
--- a/sys/compat/linuxkpi/common/include/linux/seqlock.h
+++ b/sys/compat/linuxkpi/common/include/linux/seqlock.h
@@ -71,7 +71,7 @@ write_seqcount_end(struct seqcount *seqcount)
  * XXX: Are predicts from inline functions still not honored by clang?
  */
 #define	__read_seqcount_retry(seqcount, gen)	\
-	(!seqc_consistent_nomb(&(seqcount)->seqc, gen))
+	(!seqc_consistent_no_fence(&(seqcount)->seqc, gen))
 #define	read_seqcount_retry(seqcount, gen)	\
 	(!seqc_consistent(&(seqcount)->seqc, gen))
 
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index fe67395a32fc..e7b3191bae30 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -2941,7 +2941,7 @@ fgetvp_lookup_smr(int fd, struct nameidata *ndp, struct vnode **vpp, bool *fsear
 	 */
 	atomic_thread_fence_acq();
 	fdt = fdp->fd_files;
-	if (__predict_false(!seqc_consistent_nomb(fd_seqc(fdt, fd), seq)))
+	if (__predict_false(!seqc_consistent_no_fence(fd_seqc(fdt, fd), seq)))
 		return (EAGAIN);
 	/*
 	 * If file descriptor doesn't have all rights,
@@ -3058,7 +3058,7 @@ fget_unlocked_seq(struct thread *td, int fd, cap_rights_t *needrightsp,
 		 */
 		atomic_thread_fence_acq();
 		fdt = fdp->fd_files;
-		if (seqc_consistent_nomb(fd_seqc(fdt, fd), seq))
+		if (seqc_consistent_no_fence(fd_seqc(fdt, fd), seq))
 			break;
 		fdrop(fp, td);
 	}
@@ -3157,7 +3157,7 @@ fget_unlocked(struct thread *td, int fd, cap_rights_t *needrightsp,
 	atomic_thread_fence_acq();
 	fdt = fdp->fd_files;
 #ifdef	CAPABILITIES
-	if (__predict_false(!seqc_consistent_nomb(fd_seqc(fdt, fd), seq)))
+	if (__predict_false(!seqc_consistent_no_fence(fd_seqc(fdt, fd), seq)))
 #else
 	if (__predict_false(fp != fdt->fdt_ofiles[fd].fde_file))
 #endif
diff --git a/sys/sys/seqc.h b/sys/sys/seqc.h
index fd9f196aceca..c401ad28b47e 100644
--- a/sys/sys/seqc.h
+++ b/sys/sys/seqc.h
@@ -107,7 +107,7 @@ seqc_read(const seqc_t *seqcp)
 	return (ret);
 }
 
-#define seqc_consistent_nomb(seqcp, oldseqc)	({	\
+#define seqc_consistent_no_fence(seqcp, oldseqc)({	\
 	const seqc_t *__seqcp = (seqcp);		\
 	seqc_t __oldseqc = (oldseqc);			\
 							\
@@ -117,7 +117,7 @@ seqc_read(const seqc_t *seqcp)
 
 #define seqc_consistent(seqcp, oldseqc)		({	\
 	atomic_thread_fence_acq();			\
-	seqc_consistent_nomb(seqcp, oldseqc);		\
+	seqc_consistent_no_fence(seqcp, oldseqc);	\
 })
 
 /*