aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2024-12-02 10:26:41 -0500
committerDavid Teigland <teigland@redhat.com>2024-12-19 13:11:24 -0600
commit6784ed98fde5b7538fff6b329b686b119ca23d8b (patch)
tree239c2ce614b6794d58ff17bd12319b709eabeb4b
parentdlm: fix srcu_read_lock() return type to int (diff)
downloadwireguard-linux-6784ed98fde5b7538fff6b329b686b119ca23d8b.tar.xz
wireguard-linux-6784ed98fde5b7538fff6b329b686b119ca23d8b.zip
dlm: return -ENOENT if no comm was found
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>
-rw-r--r--fs/dlm/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index b2f21aa00719..cf9ba6fd7a28 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -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);