diff options
author | Alexander Aring <aahringo@redhat.com> | 2021-05-21 22:08:45 +0300 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2021-05-25 17:22:20 +0300 |
commit | 8e2e40860c7f67c0b19b13d92cfea03a19232ce2 (patch) | |
tree | a5ae89de0399707d2351388907edcd7a194e86a7 /fs/dlm/util.c | |
parent | 37a247da517f4315eed21585be8aa516e0b9cec9 (diff) | |
download | linux-8e2e40860c7f67c0b19b13d92cfea03a19232ce2.tar.xz |
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.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/dlm/util.c b/fs/dlm/util.c index 74a8c5bfe9b5..58acbcc2081a 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); } |