diff options
author | Alexander Aring <aahringo@redhat.com> | 2022-04-04 16:06:40 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2022-04-06 14:02:32 -0500 |
commit | 2f9dbeda8dc04b5b754e032000adf6bab03aa9be (patch) | |
tree | 4c8b8c0550999d436bebd219b6e2afad4edc0c98 /fs/dlm/lock.c | |
parent | 3428785a65dabf05bc899b6c5334984e98286184 (diff) | |
download | lwn-2f9dbeda8dc04b5b754e032000adf6bab03aa9be.tar.gz lwn-2f9dbeda8dc04b5b754e032000adf6bab03aa9be.zip |
dlm: use __le types for rcom messages
This patch changes to use __le types directly in the dlm rcom
structure which is casted at the right dlm message buffer positions.
The main goal what is reached here is to remove sparse warnings
regarding to host to little byte order conversion or vice versa. Leaving
those sparse issues ignored and always do it in out/in functionality
tends to leave it unknown in which byte order the variable is being
handled.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/lock.c')
-rw-r--r-- | fs/dlm/lock.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c index a889d7a6784d..ff3dd79f5751 100644 --- a/fs/dlm/lock.c +++ b/fs/dlm/lock.c @@ -5062,8 +5062,7 @@ void dlm_receive_buffer(union dlm_packet *p, int nodeid) type = p->message.m_type; break; case DLM_RCOM: - dlm_rcom_in(&p->rcom); - type = p->rcom.rc_type; + type = le32_to_cpu(p->rcom.rc_type); break; default: log_print("invalid h_cmd %d from %u", hd->h_cmd, nodeid); |