dcache: declare write_pending before it is used