mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +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)
|
||||
{
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user