finish basic lock, but something is wrong.

writeback function is not good, correct it soon!