diff options
author | delphij <delphij@FreeBSD.org> | 2014-03-20 00:05:23 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-03-20 00:05:23 +0000 |
commit | 5cc12e5eafe8e508a56b55169b83b862188a78a8 (patch) | |
tree | 29b1936aef8dd78cc2cbd94e6a42d4702fa2570d | |
parent | e5948aa6c84c3b3417fa313985e746af7672af7e (diff) | |
download | FreeBSD-src-5cc12e5eafe8e508a56b55169b83b862188a78a8.zip FreeBSD-src-5cc12e5eafe8e508a56b55169b83b862188a78a8.tar.gz |
MFC r260181:
Fix build on platforms where atomic_swap_64 is not available.
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c index e69fcd3..7540320 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c @@ -312,8 +312,12 @@ feature_sync(spa_t *spa, zfeature_info_t *feature, uint64_t refcount, 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) |