aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/util.c
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2021-05-21 15:08:45 -0400
committerDavid Teigland <teigland@redhat.com>2021-05-25 09:22:20 -0500
commit8e2e40860c7f67c0b19b13d92cfea03a19232ce2 (patch)
treea5ae89de0399707d2351388907edcd7a194e86a7 /fs/dlm/util.c
parent37a247da517f4315eed21585be8aa516e0b9cec9 (diff)
downloadlinux-8e2e40860c7f67c0b19b13d92cfea03a19232ce2.tar.gz
fs: dlm: add union in dlm header for lockspace id
This patch adds union inside the lockspace id to handle it also for another use case for a different dlm command. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/util.c')
-rw-r--r--fs/dlm/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/dlm/util.c b/fs/dlm/util.c
index 74a8c5bfe9b55..58acbcc2081ad 100644
--- a/fs/dlm/util.c
+++ b/fs/dlm/util.c
@@ -23,7 +23,8 @@
void header_out(struct dlm_header *hd)
{
hd->h_version = cpu_to_le32(hd->h_version);
- hd->h_lockspace = cpu_to_le32(hd->h_lockspace);
+ /* does it for others u32 in union as well */
+ hd->u.h_lockspace = cpu_to_le32(hd->u.h_lockspace);
hd->h_nodeid = cpu_to_le32(hd->h_nodeid);
hd->h_length = cpu_to_le16(hd->h_length);
}
@@ -31,7 +32,8 @@ void header_out(struct dlm_header *hd)
void header_in(struct dlm_header *hd)
{
hd->h_version = le32_to_cpu(hd->h_version);
- hd->h_lockspace = le32_to_cpu(hd->h_lockspace);
+ /* does it for others u32 in union as well */
+ hd->u.h_lockspace = le32_to_cpu(hd->u.h_lockspace);
hd->h_nodeid = le32_to_cpu(hd->h_nodeid);
hd->h_length = le16_to_cpu(hd->h_length);
}