diff --git a/lib/luks2/hw_opal/hw_opal.c b/lib/luks2/hw_opal/hw_opal.c index 8f88433f..ed1c5155 100644 --- a/lib/luks2/hw_opal/hw_opal.c +++ b/lib/luks2/hw_opal/hw_opal.c @@ -790,7 +790,11 @@ int opal_factory_reset(struct crypt_device *cd, if (password_len > OPAL_KEY_MAX) return -EINVAL; - fd = device_open(cd, dev, O_RDONLY); + /* + * Submit PSID reset on R/W file descriptor so it + * triggers blkid rescan after we close it. + */ + fd = device_open(cd, dev, O_RDWR); if (fd < 0) return -EIO;