Skip to content

Commit 90ad918

Browse files
Alexander Aringteigland
authored andcommitted
dlm: never return invalid nodeid by dlm_our_nodeid()
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 <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent d3b3d2d commit 90ad918

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/dlm/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ int dlm_comm_seq(int nodeid, uint32_t *seq)
928928

929929
int dlm_our_nodeid(void)
930930
{
931-
return local_comm ? local_comm->nodeid : 0;
931+
return local_comm->nodeid;
932932
}
933933

934934
/* num 0 is first addr, num 1 is second addr */

0 commit comments

Comments
 (0)