use defer for the read-unlocks