Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   Fix endian problem with DLM_RCOM_LOCK_REPLY (http://www.linux-archive.org/cluster-development/37871-fix-endian-problem-dlm_rcom_lock_reply.html)

"Fabio M. Di Nitto" 01-15-2008 09:04 AM

Fix endian problem with DLM_RCOM_LOCK_REPLY
 
Hi Steven,

We need to swab the rc_buf also when we receive DLM_RCOM_LOCK_REPLY
otherwise umount'ing gfs2 on big endian machines will hang the entire
cluster.


Please apply.

Thanks
Fabio

Signed-off-by: Fabio M. Di Nitto <fabbione@ubuntu.com>

diff --git a/fs/dlm/util.c b/fs/dlm/util.c
index 963889c..5320304 100644
--- a/fs/dlm/util.c
+++ b/fs/dlm/util.c
@@ -156,7 +156,7 @@ 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)
+ if ((rc->rc_type == DLM_RCOM_LOCK) || (rc->rc_type == DLM_RCOM_LOCK_REPLY))
rcom_lock_in((struct rcom_lock *) rc->rc_buf);

else if (rc->rc_type == DLM_RCOM_STATUS_REPLY)


--
I'm going to make him an offer he can't refuse.


All times are GMT. The time now is 11:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.