Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*

@@ -1238,11 +1238,11 @@
 out:
         if (error) {
                 dmu_objset_disown(zfsvfs->z_os, zfsvfs);
                 zfsvfs_free(zfsvfs);
         } else {
-                atomic_add_32(&zfs_active_fs_count, 1);
+                atomic_inc_32(&zfs_active_fs_count);
         }
 
         return (error);
 }
 

@@ -2156,11 +2156,11 @@
         if (zfsvfs->z_issnap && (vfsp != rootvfs))
                 VFS_RELE(zfsvfs->z_parent->z_vfs);
 
         zfsvfs_free(zfsvfs);
 
-        atomic_add_32(&zfs_active_fs_count, -1);
+        atomic_dec_32(&zfs_active_fs_count);
 }
 
 /*
  * VFS_INIT() initialization.  Note that there is no VFS_FINI(),
  * so we can't safely do any non-idempotent initialization here.