1
0
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:
David Teigland 2019-06-10 12:04:49 -05:00
parent 49b8846567
commit b7850faba7

View File

@ -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);
}