Ricardo M. Correia wrote: > Ricardo M. Correia wrote: >> boolean_t need_lock = !RW_LOCK_HELD(&dp->dp_config_rwlock); >> >> if (need_lock) >> rw_enter(&dp->dp_config_rwlock, RW_READER); >> > > Maybe I posted to soon. > Am I right that this specific code (in dsl_dataset.c) would work > correctly if RW_LOCK_HELD() returned true if *another* thread is holding > the lock as a reader?
RW_LOCK_HELD() returns true if any thread is holding the lock no matter if as reader or writer. --- frankB
