I note that in atomic.h, there''s a call for atomic_inc as well as
atomic_add.
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/sys/atomic.h
I came across this entry in zfs_vfsops.c which uses
''atomic_add_32(...,1)'' instead of
''atomic_inc_32(...)''
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/zfs/zfs_vfsops.c
1139 out:
1140 if (error) {
1141 dmu_objset_disown(zfsvfs->z_os, zfsvfs);
1142 zfsvfs_free(zfsvfs);
1143 } else {
1144 atomic_add_32(&zfs_active_fs_count, 1);
1145 }
There''s a similar atomic_add_31 with a -1 later on, which could use
atomic_dec:
2029 zfsvfs_free(zfsvfs);
2030
2031 atomic_add_32(&zfs_active_fs_count, -1);
Here''s a patch to change into an inc/dec if you''re interested.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: application/octet-stream
Size: 643 bytes
Desc: not available
URL:
<http://mail.opensolaris.org/pipermail/zfs-code/attachments/20100220/f2687b50/attachment.obj>