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

@@ -127,11 +127,11 @@
                         goto out;
                 }
                 recv->r_ibinc = kmem_cache_alloc(rdsv3_ib_incoming_slab,
                     KM_NOSLEEP);
                 if (recv->r_ibinc == NULL) {
-                        atomic_add_32(&rdsv3_ib_allocation, -1);
+                        atomic_dec_32(&rdsv3_ib_allocation);
                         goto out;
                 }
                 rdsv3_inc_init(&recv->r_ibinc->ii_inc, conn, conn->c_faddr);
                 recv->r_ibinc->ii_ibdev = ic->rds_ibdev;
                 recv->r_ibinc->ii_pool = ic->rds_ibdev->inc_pool;

@@ -152,11 +152,11 @@
 
         return (0);
 out:
         if (recv->r_ibinc) {
                 kmem_cache_free(rdsv3_ib_incoming_slab, recv->r_ibinc);
-                atomic_add_32(&rdsv3_ib_allocation, -1);
+                atomic_dec_32(&rdsv3_ib_allocation);
                 recv->r_ibinc = NULL;
         }
         return (-ENOMEM);
 }