Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
*** 612,622 ****
* Direct Writes
*/
if (!exclusive) {
ufs_shared_writes++;
! ncur = atomic_add_32_nv(&ufs_cur_writes, 1);
if (ncur > ufs_maxcur_writes)
ufs_maxcur_writes = ncur;
}
/*
--- 612,622 ----
* Direct Writes
*/
if (!exclusive) {
ufs_shared_writes++;
! ncur = atomic_inc_32_nv(&ufs_cur_writes);
if (ncur > ufs_maxcur_writes)
ufs_maxcur_writes = ncur;
}
/*
*** 725,735 ****
as_pageunlock(as, pplist, pglck_base, pglck_size, S_READ);
}
if (!exclusive) {
! atomic_add_32(&ufs_cur_writes, -1);
/*
* If this write was done shared, readers may
* have pulled in unmodified pages. Get rid of
* these potentially stale pages.
*/
--- 725,735 ----
as_pageunlock(as, pplist, pglck_base, pglck_size, S_READ);
}
if (!exclusive) {
! atomic_dec_32(&ufs_cur_writes);
/*
* If this write was done shared, readers may
* have pulled in unmodified pages. Get rid of
* these potentially stale pages.
*/