check locks when writeback

It can work now,actually it need not to many locks.