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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/ufs/lufs.c
          +++ new/usr/src/uts/common/fs/ufs/lufs.c
↓ open down ↓ 912 lines elided ↑ open up ↑
 913  913           *      NULL the trans ops table.
 914  914           *      Free all of the incore structs related to logging.
 915  915           * Allow reader ops.
 916  916           */
 917  917          ufs_thread_suspend(&ufsvfsp->vfs_reclaim);
 918  918          ufs_thread_exit(&ufsvfsp->vfs_delete);
 919  919  
 920  920          vfs_lock_wait(ufsvfsp->vfs_vfs);
 921  921          ulp = &ufsvfsp->vfs_ulockfs;
 922  922          mutex_enter(&ulp->ul_lock);
 923      -        atomic_add_long(&ufs_quiesce_pend, 1);
      923 +        atomic_inc_ulong(&ufs_quiesce_pend);
 924  924          (void) ufs_quiesce(ulp);
 925  925  
 926  926          (void) ufs_flush(ufsvfsp->vfs_vfs);
 927  927  
 928  928          TRANS_MATA_UMOUNT(ufsvfsp);
 929  929          ufsvfsp->vfs_domatamap = 0;
 930  930  
 931  931          /*
 932  932           * Free all of the incore structs
 933  933           * Aquire the ufs_scan_lock before de-linking the mtm data
 934  934           * structure so that we keep ufs_sync() and ufs_update() away
 935  935           * when they execute the ufs_scan_inodes() run while we're in
 936  936           * progress of enabling/disabling logging.
 937  937           */
 938  938          mutex_enter(&ufs_scan_lock);
 939  939          (void) lufs_unsnarf(ufsvfsp);
 940  940          mutex_exit(&ufs_scan_lock);
 941  941  
 942      -        atomic_add_long(&ufs_quiesce_pend, -1);
      942 +        atomic_dec_ulong(&ufs_quiesce_pend);
 943  943          mutex_exit(&ulp->ul_lock);
 944  944          vfs_setmntopt(ufsvfsp->vfs_vfs, MNTOPT_NOLOGGING, NULL, 0);
 945  945          vfs_unlock(ufsvfsp->vfs_vfs);
 946  946  
 947  947          fs->fs_rolled = FS_ALL_ROLLED;
 948  948          ufsvfsp->vfs_nolog_si = 0;
 949  949  
 950  950          /*
 951  951           * Free the log space and mark the superblock as FSACTIVE
 952  952           */
↓ open down ↓ 572 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX