mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmlockd: accept repeated global lock requests
It's not an error if a command requests the global lock when it has already acquired it. It shouldn't happen, but there could be cases we've not found.
This commit is contained in:
parent
6a44dceb48
commit
0c1d3db8db
@ -1547,6 +1547,16 @@ int lockd_gl(struct cmd_context *cmd, const char *def_mode, uint32_t flags)
|
||||
}
|
||||
}
|
||||
|
||||
if (result == -EALREADY) {
|
||||
/*
|
||||
* This should generally not happen because commands should be coded
|
||||
* to avoid reacquiring the global lock. If there is a case that's
|
||||
* missed which causes the command to request the gl when it's already
|
||||
* held, it's not a problem, so let it go.
|
||||
*/
|
||||
log_debug("lockd global mode %s already held.", mode);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!strcmp(mode, "un"))
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user