dlm: fix srcu_read_lock() return type to int
authorAlexander Aring <aahringo@redhat.com>
Mon, 2 Dec 2024 15:26:37 +0000 (10:26 -0500)
committerDavid Teigland <teigland@redhat.com>
Thu, 19 Dec 2024 19:11:23 +0000 (13:11 -0600)
The return type of srcu_read_lock() is int and not bool. Whereas we
using the ret variable only to evaluate a bool type of
dlm_lowcomms_con_has_addr() to check if an address is already being set.

Fixes: 6f0b0b5d7ae7 ("fs: dlm: remove dlm_node_addrs lookup list")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lowcomms.c

index df40c3fd10702c825c4847552da43cad092e2210..d28141829c051b5fb7cedf73a27b15c49b3f7307 100644 (file)
@@ -462,7 +462,8 @@ static bool dlm_lowcomms_con_has_addr(const struct connection *con,
 int dlm_lowcomms_addr(int nodeid, struct sockaddr_storage *addr)
 {
        struct connection *con;
-       bool ret, idx;
+       bool ret;
+       int idx;
 
        idx = srcu_read_lock(&connections_srcu);
        con = nodeid2con(nodeid, GFP_NOFS);