This should check !m_ictx->read_only as well, in case the image was opened read-only, for example when reading from a snapshot, doing an 'rbd export', or reading from an earlier parent in a chain of clones e.g. parent1 -> parent2 -> current image.