dm cache: fix race in writethrough implementation