dlm: return -ENOENT if no comm was found
authorAlexander Aring <aahringo@redhat.com>
Mon, 2 Dec 2024 15:26:41 +0000 (10:26 -0500)
committerDavid Teigland <teigland@redhat.com>
Thu, 19 Dec 2024 19:11:24 +0000 (13:11 -0600)
Currently if no comm can be found dlm_comm_seq() returns -EEXIST which
means entry already exists for a lookup it makes no sense to return
-EEXIST. We change it to -ENOENT. There is no user that will evaluate
the return value on a specific value so this should be fine.

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

index b2f21aa00719555308995fc6fe813de758add3c9..cf9ba6fd7a281f75b6da3487e52b9f47cda33155 100644 (file)
@@ -935,7 +935,7 @@ int dlm_comm_seq(int nodeid, uint32_t *seq, bool locked)
                mutex_unlock(&clusters_root.subsys.su_mutex);
        }
        if (!cm)
-               return -EEXIST;
+               return -ENOENT;
 
        *seq = cm->seq;
        put_comm(cm);