rwlock: reduce lock accesses similarly to r311172
Discussed with: jhb Tested by: pho (previous version)