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

*** 1238,1248 **** out: if (error) { dmu_objset_disown(zfsvfs->z_os, zfsvfs); zfsvfs_free(zfsvfs); } else { ! atomic_add_32(&zfs_active_fs_count, 1); } return (error); } --- 1238,1248 ---- out: if (error) { dmu_objset_disown(zfsvfs->z_os, zfsvfs); zfsvfs_free(zfsvfs); } else { ! atomic_inc_32(&zfs_active_fs_count); } return (error); }
*** 2156,2166 **** if (zfsvfs->z_issnap && (vfsp != rootvfs)) VFS_RELE(zfsvfs->z_parent->z_vfs); zfsvfs_free(zfsvfs); ! atomic_add_32(&zfs_active_fs_count, -1); } /* * VFS_INIT() initialization. Note that there is no VFS_FINI(), * so we can't safely do any non-idempotent initialization here. --- 2156,2166 ---- if (zfsvfs->z_issnap && (vfsp != rootvfs)) VFS_RELE(zfsvfs->z_parent->z_vfs); zfsvfs_free(zfsvfs); ! 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.