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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/ctfs/ctfs_root.c
          +++ new/usr/src/uts/common/fs/ctfs/ctfs_root.c
↓ open down ↓ 232 lines elided ↑ open up ↑
 233  233  
 234  234          data = kmem_alloc(sizeof (ctfs_vfs_t), KM_SLEEP);
 235  235  
 236  236          /*
 237  237           * Initialize vfs fields not initialized by VFS_INIT/domount
 238  238           */
 239  239          vfsp->vfs_bsize = DEV_BSIZE;
 240  240          vfsp->vfs_fstype = ctfs_fstype;
 241  241          do {
 242  242                  dev = makedevice(ctfs_major,
 243      -                    atomic_add_32_nv(&ctfs_minor, 1) & L_MAXMIN32);
      243 +                    atomic_inc_32_nv(&ctfs_minor) & L_MAXMIN32);
 244  244          } while (vfs_devismounted(dev));
 245  245          vfs_make_fsid(&vfsp->vfs_fsid, dev, ctfs_fstype);
 246  246          vfsp->vfs_data = data;
 247  247          vfsp->vfs_dev = dev;
 248  248  
 249  249          /*
 250  250           * Dynamically create gfs_dirent_t array for the root directory.
 251  251           */
 252  252          dirent = kmem_zalloc((ct_ntypes + 2) * sizeof (gfs_dirent_t), KM_SLEEP);
 253  253          for (i = 0; i < ct_ntypes; i++) {
↓ open down ↓ 268 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX