diff options
author | Fabio M. Di Nitto <fabbione@ubuntu.com> | 2008-01-15 15:13:36 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2008-01-30 11:04:41 -0600 |
commit | 550283e30ccec5ddab9749a77b0022ebcaf0f3af (patch) | |
tree | bf95681d9dd4bc866c8ad59d8556578ead753e7a /fs/dlm/util.c | |
parent | e7847d35ac39fe92c94540e88ac3d0e177f52d9e (diff) | |
download | blackbird-op-linux-550283e30ccec5ddab9749a77b0022ebcaf0f3af.tar.gz blackbird-op-linux-550283e30ccec5ddab9749a77b0022ebcaf0f3af.zip |
dlm: swap bytes for rcom lock reply
DLM_RCOM_LOCK_REPLY messages need byte swapping.
Signed-off-by: Fabio M. Di Nitto <fabbione@ubuntu.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/util.c')
-rw-r--r-- | fs/dlm/util.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/dlm/util.c b/fs/dlm/util.c index 963889cf6740..38dcfeb9c4b7 100644 --- a/fs/dlm/util.c +++ b/fs/dlm/util.c @@ -137,7 +137,7 @@ void dlm_rcom_out(struct dlm_rcom *rc) rc->rc_seq = cpu_to_le64(rc->rc_seq); rc->rc_seq_reply = cpu_to_le64(rc->rc_seq_reply); - if (type == DLM_RCOM_LOCK) + if ((type == DLM_RCOM_LOCK) || (type == DLM_RCOM_LOCK_REPLY)) rcom_lock_out((struct rcom_lock *) rc->rc_buf); else if (type == DLM_RCOM_STATUS_REPLY) @@ -147,6 +147,7 @@ void dlm_rcom_out(struct dlm_rcom *rc) void dlm_rcom_in(struct dlm_rcom *rc) { struct dlm_header *hd = (struct dlm_header *) rc; + int type; header_in(hd); @@ -156,10 +157,12 @@ void dlm_rcom_in(struct dlm_rcom *rc) rc->rc_seq = le64_to_cpu(rc->rc_seq); rc->rc_seq_reply = le64_to_cpu(rc->rc_seq_reply); - if (rc->rc_type == DLM_RCOM_LOCK) + type = rc->rc_type; + + if ((type == DLM_RCOM_LOCK) || (type == DLM_RCOM_LOCK_REPLY)) rcom_lock_in((struct rcom_lock *) rc->rc_buf); - else if (rc->rc_type == DLM_RCOM_STATUS_REPLY) + else if (type == DLM_RCOM_STATUS_REPLY) rcom_config_in((struct rcom_config *) rc->rc_buf); } |