mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-19 14:04:17 +03:00
locking: fix repeated convert to ex
Some uncommon commands like pvchange -a -u may call convert to ex multiple times.
This commit is contained in:
parent
49b8846567
commit
b7850faba7
@ -384,6 +384,10 @@ int lockf_global(struct cmd_context *cmd, const char *mode)
|
|||||||
|
|
||||||
int lockf_global_convert(struct cmd_context *cmd, const char *mode)
|
int lockf_global_convert(struct cmd_context *cmd, const char *mode)
|
||||||
{
|
{
|
||||||
|
/* some uncommon cases like pvchange -a can call this multiple times */
|
||||||
|
if (cmd->lockf_global_ex && !strcmp(mode, "ex"))
|
||||||
|
return 1;
|
||||||
|
|
||||||
return _lockf_global(cmd, mode, 1);
|
return _lockf_global(cmd, mode, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user