fix checks when releasing write locks (101)
fix checks when releasing write locks (101)

aidancully/rust,rust-lang/miri,graydon/rust,aidancully/rust,graydon/rust,tsion/miri,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,rust-lang/miri,aidancully/rust,GBGamer/rust,rust-lang/miri,graydon/rust,GBGamer/rust,rust-lang/miri,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust