svn commit: r353168 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Mon Oct 7 08:00:54 UTC 2019


Author: avg
Date: Mon Oct  7 08:00:54 2019
New Revision: 353168
URL: https://svnweb.freebsd.org/changeset/base/353168

Log:
  ZFS: unconditionally use atomic_swap_64
  
  Previously, the code used a plain store on platforms that lacked
  atomic_swap_64 and possibly some other platforms as the condition worked
  only if atomic_swap_64 was a macro.
  
  MFC after:	1 week
  X-MFC after:	r353166, r353167

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c	Mon Oct  7 07:54:34 2019	(r353167)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c	Mon Oct  7 08:00:54 2019	(r353168)
@@ -313,12 +313,8 @@ feature_sync(spa_t *spa, zfeature_info_t *feature, uin
 	if (feature->fi_feature != SPA_FEATURE_NONE) {
 		uint64_t *refcount_cache =
 		    &spa->spa_feat_refcount_cache[feature->fi_feature];
-#ifdef atomic_swap_64
 		VERIFY3U(*refcount_cache, ==,
 		    atomic_swap_64(refcount_cache, refcount));
-#else
-		*refcount_cache = refcount;
-#endif
 	}
 
 	if (refcount == 0)


More information about the svn-src-head mailing list