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

@@ -2400,11 +2400,11 @@
  */
 void
 snf_vmap_desbfree(snf_vmap_desbinfo *snfv)
 {
         ASSERT(snfv->snfv_ref != 0);
-        if (atomic_add_32_nv(&snfv->snfv_ref, -1) == 0) {
+        if (atomic_dec_32_nv(&snfv->snfv_ref) == 0) {
                 vpm_unmap_pages(snfv->snfv_vml, S_READ);
                 VN_RELE(snfv->snfv_vp);
                 kmem_free(snfv, sizeof (snf_vmap_desbinfo));
         }
 }