aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/config.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2020-09-24 10:31:23 -0400
committerDavid Teigland <teigland@redhat.com>2020-09-29 14:00:32 -0500
commit3f78cd7d2449a07904b3a23751758cbdeaaa20f3 (patch)
tree090014706fb958cb5b63c7d7453487a0c8126a18 /fs/dlm/config.c
parent0461e0db941f8f49dcfd0576c4449f2e5beda2f6 (diff)
downloadlinux-3f78cd7d2449a07904b3a23751758cbdeaaa20f3.tar.gz
fs: dlm: fix mark per nodeid setting
This patch fixes to set per nodeid mark configuration for accepted sockets as well. Before this patch only the listen socket mark value was used for all accepted connections. This patch will ensure that the cluster mark attribute value will be always used for all sockets, if a per nodeid mark value is specified dlm will use this value for the specific node. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/config.c')
-rw-r--r--fs/dlm/config.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index f33a7e4ae917b..ca4a9795afbe2 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -860,18 +860,22 @@ int dlm_comm_seq(int nodeid, uint32_t *seq)
return 0;
}
-int dlm_comm_mark(int nodeid, unsigned int *mark)
+void dlm_comm_mark(int nodeid, unsigned int *mark)
{
struct dlm_comm *cm;
cm = get_comm(nodeid);
- if (!cm)
- return -ENOENT;
+ if (!cm) {
+ *mark = dlm_config.ci_mark;
+ return;
+ }
- *mark = cm->mark;
- put_comm(cm);
+ if (cm->mark)
+ *mark = cm->mark;
+ else
+ *mark = dlm_config.ci_mark;
- return 0;
+ put_comm(cm);
}
int dlm_our_nodeid(void)