diff options
Diffstat (limited to 'fs/dlm/util.c')
-rw-r--r-- | fs/dlm/util.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/fs/dlm/util.c b/fs/dlm/util.c index 4d9c1f4e1bd1..e36520af7cc0 100644 --- a/fs/dlm/util.c +++ b/fs/dlm/util.c | |||
@@ -131,52 +131,8 @@ 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) | ||
165 | { | ||
166 | rf->rf_lvblen = cpu_to_le32(rf->rf_lvblen); | ||
167 | rf->rf_lsflags = cpu_to_le32(rf->rf_lsflags); | ||
168 | } | ||
169 | |||
170 | static void rcom_config_in(struct rcom_config *rf) | ||
171 | { | ||
172 | rf->rf_lvblen = le32_to_cpu(rf->rf_lvblen); | ||
173 | rf->rf_lsflags = le32_to_cpu(rf->rf_lsflags); | ||
174 | } | ||
175 | |||
176 | void dlm_rcom_out(struct dlm_rcom *rc) | 134 | void dlm_rcom_out(struct dlm_rcom *rc) |
177 | { | 135 | { |
178 | int type = rc->rc_type; | ||
179 | |||
180 | header_out(&rc->rc_header); | 136 | header_out(&rc->rc_header); |
181 | 137 | ||
182 | rc->rc_type = cpu_to_le32(rc->rc_type); | 138 | rc->rc_type = cpu_to_le32(rc->rc_type); |
@@ -184,18 +140,10 @@ void dlm_rcom_out(struct dlm_rcom *rc) | |||
184 | rc->rc_id = cpu_to_le64(rc->rc_id); | 140 | rc->rc_id = cpu_to_le64(rc->rc_id); |
185 | rc->rc_seq = cpu_to_le64(rc->rc_seq); | 141 | rc->rc_seq = cpu_to_le64(rc->rc_seq); |
186 | rc->rc_seq_reply = cpu_to_le64(rc->rc_seq_reply); | 142 | rc->rc_seq_reply = cpu_to_le64(rc->rc_seq_reply); |
187 | |||
188 | if ((type == DLM_RCOM_LOCK) || (type == DLM_RCOM_LOCK_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); | ||
193 | } | 143 | } |
194 | 144 | ||
195 | void dlm_rcom_in(struct dlm_rcom *rc) | 145 | void dlm_rcom_in(struct dlm_rcom *rc) |
196 | { | 146 | { |
197 | int type; | ||
198 | |||
199 | header_in(&rc->rc_header); | 147 | header_in(&rc->rc_header); |
200 | 148 | ||
201 | rc->rc_type = le32_to_cpu(rc->rc_type); | 149 | rc->rc_type = le32_to_cpu(rc->rc_type); |
@@ -203,13 +151,4 @@ void dlm_rcom_in(struct dlm_rcom *rc) | |||
203 | rc->rc_id = le64_to_cpu(rc->rc_id); | 151 | rc->rc_id = le64_to_cpu(rc->rc_id); |
204 | rc->rc_seq = le64_to_cpu(rc->rc_seq); | 152 | rc->rc_seq = le64_to_cpu(rc->rc_seq); |
205 | rc->rc_seq_reply = le64_to_cpu(rc->rc_seq_reply); | 153 | rc->rc_seq_reply = le64_to_cpu(rc->rc_seq_reply); |
206 | |||
207 | type = rc->rc_type; | ||
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); | ||
214 | } | 154 | } |
215 | |||