dm cache: fix race affecting dirty block count