iterator: code review cleanup
iterator: more cleanup
iterator: fix double lock of linear buffer