remove ineffective code

barrier <= write_idx guaranteed