diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-01-25 02:08:26 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2008-02-04 02:23:14 -0500 |
commit | 163a1859ec6c4c33547bf4613efabf52031566aa (patch) | |
tree | 04a6dc1c69f726c6686d2a731692fddfdf47d2f2 /fs/dlm/util.c | |
parent | eef7d739c218cb2546cf95686db77de0d76e4122 (diff) |
dlm: do not byteswap rcom_lock
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/util.c')
-rw-r--r-- | fs/dlm/util.c | 45 |
1 files changed, 2 insertions, 43 deletions
diff --git a/fs/dlm/util.c b/fs/dlm/util.c index 4d9c1f4e1bd1..d3ed6da0b650 100644 --- a/fs/dlm/util.c +++ b/fs/dlm/util.c | |||
@@ -131,36 +131,6 @@ void dlm_message_in(struct dlm_message *ms) | |||
131 | ms->m_result = from_dlm_errno(le32_to_cpu(ms->m_result)); | 131 | ms->m_result = from_dlm_errno(le32_to_cpu(ms->m_result)); |
132 | } | 132 | } |
133 | 133 | ||
134 | static void rcom_lock_out(struct rcom_lock *rl) | ||
135 | { | ||
136 | rl->rl_ownpid = cpu_to_le32(rl->rl_ownpid); | ||
137 | rl->rl_lkid = cpu_to_le32(rl->rl_lkid); | ||
138 | rl->rl_remid = cpu_to_le32(rl->rl_remid); | ||
139 | rl->rl_parent_lkid = cpu_to_le32(rl->rl_parent_lkid); | ||
140 | rl->rl_parent_remid = cpu_to_le32(rl->rl_parent_remid); | ||
141 | rl->rl_exflags = cpu_to_le32(rl->rl_exflags); | ||
142 | rl->rl_flags = cpu_to_le32(rl->rl_flags); | ||
143 | rl->rl_lvbseq = cpu_to_le32(rl->rl_lvbseq); | ||
144 | rl->rl_result = cpu_to_le32(rl->rl_result); | ||
145 | rl->rl_wait_type = cpu_to_le16(rl->rl_wait_type); | ||
146 | rl->rl_namelen = cpu_to_le16(rl->rl_namelen); | ||
147 | } | ||
148 | |||
149 | static void rcom_lock_in(struct rcom_lock *rl) | ||
150 | { | ||
151 | rl->rl_ownpid = le32_to_cpu(rl->rl_ownpid); | ||
152 | rl->rl_lkid = le32_to_cpu(rl->rl_lkid); | ||
153 | rl->rl_remid = le32_to_cpu(rl->rl_remid); | ||
154 | rl->rl_parent_lkid = le32_to_cpu(rl->rl_parent_lkid); | ||
155 | rl->rl_parent_remid = le32_to_cpu(rl->rl_parent_remid); | ||
156 | rl->rl_exflags = le32_to_cpu(rl->rl_exflags); | ||
157 | rl->rl_flags = le32_to_cpu(rl->rl_flags); | ||
158 | rl->rl_lvbseq = le32_to_cpu(rl->rl_lvbseq); | ||
159 | rl->rl_result = le32_to_cpu(rl->rl_result); | ||
160 | rl->rl_wait_type = le16_to_cpu(rl->rl_wait_type); | ||
161 | rl->rl_namelen = le16_to_cpu(rl->rl_namelen); | ||
162 | } | ||
163 | |||
164 | static void rcom_config_out(struct rcom_config *rf) | 134 | static void rcom_config_out(struct rcom_config *rf) |
165 | { | 135 | { |
166 | rf->rf_lvblen = cpu_to_le32(rf->rf_lvblen); | 136 | rf->rf_lvblen = cpu_to_le32(rf->rf_lvblen); |
@@ -185,17 +155,12 @@ void dlm_rcom_out(struct dlm_rcom *rc) | |||
185 | rc->rc_seq = cpu_to_le64(rc->rc_seq); | 155 | rc->rc_seq = cpu_to_le64(rc->rc_seq); |
186 | rc->rc_seq_reply = cpu_to_le64(rc->rc_seq_reply); | 156 | rc->rc_seq_reply = cpu_to_le64(rc->rc_seq_reply); |
187 | 157 | ||
188 | if ((type == DLM_RCOM_LOCK) || (type == DLM_RCOM_LOCK_REPLY)) | 158 | if (type == DLM_RCOM_STATUS_REPLY) |
189 | rcom_lock_out((struct rcom_lock *) rc->rc_buf); | ||
190 | |||
191 | else if (type == DLM_RCOM_STATUS_REPLY) | ||
192 | rcom_config_out((struct rcom_config *) rc->rc_buf); | 159 | rcom_config_out((struct rcom_config *) rc->rc_buf); |
193 | } | 160 | } |
194 | 161 | ||
195 | void dlm_rcom_in(struct dlm_rcom *rc) | 162 | void dlm_rcom_in(struct dlm_rcom *rc) |
196 | { | 163 | { |
197 | int type; | ||
198 | |||
199 | header_in(&rc->rc_header); | 164 | header_in(&rc->rc_header); |
200 | 165 | ||
201 | rc->rc_type = le32_to_cpu(rc->rc_type); | 166 | rc->rc_type = le32_to_cpu(rc->rc_type); |
@@ -204,12 +169,6 @@ void dlm_rcom_in(struct dlm_rcom *rc) | |||
204 | rc->rc_seq = le64_to_cpu(rc->rc_seq); | 169 | rc->rc_seq = le64_to_cpu(rc->rc_seq); |
205 | rc->rc_seq_reply = le64_to_cpu(rc->rc_seq_reply); | 170 | rc->rc_seq_reply = le64_to_cpu(rc->rc_seq_reply); |
206 | 171 | ||
207 | type = rc->rc_type; | 172 | if (rc->rc_type == DLM_RCOM_STATUS_REPLY) |
208 | |||
209 | if ((type == DLM_RCOM_LOCK) || (type == DLM_RCOM_LOCK_REPLY)) | ||
210 | rcom_lock_in((struct rcom_lock *) rc->rc_buf); | ||
211 | |||
212 | else if (type == DLM_RCOM_STATUS_REPLY) | ||
213 | rcom_config_in((struct rcom_config *) rc->rc_buf); | 173 | rcom_config_in((struct rcom_config *) rc->rc_buf); |
214 | } | 174 | } |
215 | |||