Print this page
patch as-lock-macro-simplification

*** 5651,5661 **** * block on a_lock here because this waiting writer will prevent * further readers like ufs_read from progressing and could cause * deadlock between ufs_read/ufs_map/pagefault when a quiesce is * pending. */ ! while (!AS_LOCK_TRYENTER(as, &as->a_lock, RW_WRITER)) { ufs_map_alock_retry_cnt++; delay(RETRY_LOCK_DELAY); } /* --- 5651,5661 ---- * block on a_lock here because this waiting writer will prevent * further readers like ufs_read from progressing and could cause * deadlock between ufs_read/ufs_map/pagefault when a quiesce is * pending. */ ! while (!AS_LOCK_TRYENTER(as, RW_WRITER)) { ufs_map_alock_retry_cnt++; delay(RETRY_LOCK_DELAY); } /*
*** 5667,5677 **** /* * ufs_lockfs_trybegin() did not succeed. It is safer to give up * as->a_lock and wait for ulp->ul_fs_lock status to change. */ ufs_map_lockfs_retry_cnt++; ! AS_LOCK_EXIT(as, &as->a_lock); as_rangeunlock(as); if (error == EIO) goto out; mutex_enter(&ulp->ul_lock); --- 5667,5677 ---- /* * ufs_lockfs_trybegin() did not succeed. It is safer to give up * as->a_lock and wait for ulp->ul_fs_lock status to change. */ ufs_map_lockfs_retry_cnt++; ! AS_LOCK_EXIT(as); as_rangeunlock(as); if (error == EIO) goto out; mutex_enter(&ulp->ul_lock);