aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/dlm/util.c9
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)
137 rc->rc_seq = cpu_to_le64(rc->rc_seq); 137 rc->rc_seq = cpu_to_le64(rc->rc_seq);
138 rc->rc_seq_reply = cpu_to_le64(rc->rc_seq_reply); 138 rc->rc_seq_reply = cpu_to_le64(rc->rc_seq_reply);
139 139
140 if (type == DLM_RCOM_LOCK) 140 if ((type == DLM_RCOM_LOCK) || (type == DLM_RCOM_LOCK_REPLY))
141 rcom_lock_out((struct rcom_lock *) rc->rc_buf); 141 rcom_lock_out((struct rcom_lock *) rc->rc_buf);
142 142
143 else if (type == DLM_RCOM_STATUS_REPLY) 143 else if (type == DLM_RCOM_STATUS_REPLY)
@@ -147,6 +147,7 @@ void dlm_rcom_out(struct dlm_rcom *rc)
147void dlm_rcom_in(struct dlm_rcom *rc) 147void dlm_rcom_in(struct dlm_rcom *rc)
148{ 148{
149 struct dlm_header *hd = (struct dlm_header *) rc; 149 struct dlm_header *hd = (struct dlm_header *) rc;
150 int type;
150 151
151 header_in(hd); 152 header_in(hd);
152 153
@@ -156,10 +157,12 @@ void dlm_rcom_in(struct dlm_rcom *rc)
156 rc->rc_seq = le64_to_cpu(rc->rc_seq); 157 rc->rc_seq = le64_to_cpu(rc->rc_seq);
157 rc->rc_seq_reply = le64_to_cpu(rc->rc_seq_reply); 158 rc->rc_seq_reply = le64_to_cpu(rc->rc_seq_reply);
158 159
159 if (rc->rc_type == DLM_RCOM_LOCK) 160 type = rc->rc_type;
161
162 if ((type == DLM_RCOM_LOCK) || (type == DLM_RCOM_LOCK_REPLY))
160 rcom_lock_in((struct rcom_lock *) rc->rc_buf); 163 rcom_lock_in((struct rcom_lock *) rc->rc_buf);
161 164
162 else if (rc->rc_type == DLM_RCOM_STATUS_REPLY) 165 else if (type == DLM_RCOM_STATUS_REPLY)
163 rcom_config_in((struct rcom_config *) rc->rc_buf); 166 rcom_config_in((struct rcom_config *) rc->rc_buf);
164} 167}
165 168