In the next decade, x-ray polarimetry will open a new window on the high-energy Universe, as several missions that include an x-ray polarimeter are currently under development. Observations of the polarization of x rays coming from the accretion disks of stellar-mass and supermassive black holes are among the new polarimeters' major objectives. In this paper, we show that these observations can be affected by the quantum electrodynamic (QED) effect of vacuum birefringence: after an x-ray photon is emitted from the accretion disk, its polarization changes as the photon travels through the accretion disk's magnetosphere, as a result of the vacuum becoming birefringent in the presence of a magnetic field. We show that this effect can be important for black holes in the energy band of the upcoming polarimeters and has to be taken into account in a complete model of the x-ray polarization that we expect to detect from black-hole accretion disks, both for stellar mass and for supermassive black holes. We find that, for a chaotic magnetic field in the disk, QED can significantly decrease the linear polarization fraction of edge-on photons, depending on the spin of the hole and on the strength of the magnetic field. This effect can provide, for the first time, a direct way to probe the magnetic field strength close to the innermost stable orbit of black-hole accretion disks and to study the role of magnetic fields in astrophysical accretion in general.