]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dlm: never return invalid nodeid by dlm_our_nodeid()
authorAlexander Aring <aahringo@redhat.com>
Fri, 2 Aug 2024 17:26:40 +0000 (13:26 -0400)
committerDavid Teigland <teigland@redhat.com>
Thu, 8 Aug 2024 20:15:07 +0000 (15:15 -0500)
This patch will remote the return of an invalid nodeid value when
local_comm is not set. This case should never happen as the DLM stack
tries to compare valid nodeids with an invalid nodeid returned by
dlm_our_nodeid(). Instead we let it crash to getting at least recognized
if we running into such state.

Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/config.c

index 99952234799ed08e6f417255dbf20f462c039d60..eac96f1c1d7428479ba52a4fea96c00255e1ed5c 100644 (file)
@@ -928,7 +928,7 @@ int dlm_comm_seq(int nodeid, uint32_t *seq)
 
 int dlm_our_nodeid(void)
 {
-       return local_comm ? local_comm->nodeid : 0;
+       return local_comm->nodeid;
 }
 
 /* num 0 is first addr, num 1 is second addr */