mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 10:50:01 +01:00
Read and compare metadata sequence id after taking write lock.
This commit is contained in:
@@ -1796,7 +1796,8 @@ static int _crypt_format_luks2(struct crypt_device *cd,
|
||||
if (r < 0)
|
||||
goto out;
|
||||
|
||||
r = LUKS2_hdr_write(cd, &cd->u.luks2.hdr);
|
||||
/* override sequence id check with format */
|
||||
r = LUKS2_hdr_write_force(cd, &cd->u.luks2.hdr);
|
||||
if (r < 0) {
|
||||
if (r == -EBUSY)
|
||||
log_err(cd, _("Cannot format device %s in use."),
|
||||
|
||||
Reference in New Issue
Block a user