aboutsummaryrefslogtreecommitdiff
path: root/fs/dlm/util.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 09:33:02 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 09:33:02 -0800
commitb5eb9513f7c1bee862ada22bf1489f53752686bd (patch)
tree707404a45b1ca8809fa8607c5d9d96ca9c657db7 /fs/dlm/util.c
parentdde0013782dbd09e1cc68ca03860f3a62b03cb34 (diff)
parent30727174b6273c67fa96fb818fe5bdde1ad70e5c (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm: dlm: add __init and __exit marks to init and exit functions dlm: eliminate astparam type casting dlm: proper types for asts and basts dlm: dlm/user.c input validation fixes dlm: fix dlm_dir_lookup() handling of too long names dlm: fix overflows when copying from ->m_extra to lvb dlm: make find_rsb() fail gracefully when namelen is too large dlm: receive_rcom_lock_args() overflow check dlm: verify that places expecting rcom_lock have packet long enough dlm: validate data in dlm_recover_directory() dlm: missing length check in check_config() dlm: use proper type for ->ls_recover_buf dlm: do not byteswap rcom_config dlm: do not byteswap rcom_lock dlm: dlm_process_incoming_buffer() fixes dlm: use proper C for dlm/requestqueue stuff (and fix alignment bug)
Diffstat (limited to 'fs/dlm/util.c')
-rw-r--r--fs/dlm/util.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/fs/dlm/util.c b/fs/dlm/util.c
index 4d9c1f4e1bd..e36520af7cc 100644
--- a/fs/dlm/util.c
+++ b/fs/dlm/util.c
@@ -131,52 +131,8 @@ void dlm_message_in(struct dlm_message *ms)
ms->m_result = from_dlm_errno(le32_to_cpu(ms->m_result));
}
-static void rcom_lock_out(struct rcom_lock *rl)
-{
- rl->rl_ownpid = cpu_to_le32(rl->rl_ownpid);
- rl->rl_lkid = cpu_to_le32(rl->rl_lkid);
- rl->rl_remid = cpu_to_le32(rl->rl_remid);
- rl->rl_parent_lkid = cpu_to_le32(rl->rl_parent_lkid);
- rl->rl_parent_remid = cpu_to_le32(rl->rl_parent_remid);
- rl->rl_exflags = cpu_to_le32(rl->rl_exflags);
- rl->rl_flags = cpu_to_le32(rl->rl_flags);
- rl->rl_lvbseq = cpu_to_le32(rl->rl_lvbseq);
- rl->rl_result = cpu_to_le32(rl->rl_result);
- rl->rl_wait_type = cpu_to_le16(rl->rl_wait_type);
- rl->rl_namelen = cpu_to_le16(rl->rl_namelen);
-}
-
-static void rcom_lock_in(struct rcom_lock *rl)
-{
- rl->rl_ownpid = le32_to_cpu(rl->rl_ownpid);
- rl->rl_lkid = le32_to_cpu(rl->rl_lkid);
- rl->rl_remid = le32_to_cpu(rl->rl_remid);
- rl->rl_parent_lkid = le32_to_cpu(rl->rl_parent_lkid);
- rl->rl_parent_remid = le32_to_cpu(rl->rl_parent_remid);
- rl->rl_exflags = le32_to_cpu(rl->rl_exflags);
- rl->rl_flags = le32_to_cpu(rl->rl_flags);
- rl->rl_lvbseq = le32_to_cpu(rl->rl_lvbseq);
- rl->rl_result = le32_to_cpu(rl->rl_result);
- rl->rl_wait_type = le16_to_cpu(rl->rl_wait_type);
- rl->rl_namelen = le16_to_cpu(rl->rl_namelen);
-}
-
-static void rcom_config_out(struct rcom_config *rf)
-{
- rf->rf_lvblen = cpu_to_le32(rf->rf_lvblen);
- rf->rf_lsflags = cpu_to_le32(rf->rf_lsflags);
-}
-
-static void rcom_config_in(struct rcom_config *rf)
-{
- rf->rf_lvblen = le32_to_cpu(rf->rf_lvblen);
- rf->rf_lsflags = le32_to_cpu(rf->rf_lsflags);
-}
-
void dlm_rcom_out(struct dlm_rcom *rc)
{
- int type = rc->rc_type;
-
header_out(&rc->rc_header);
rc->rc_type = cpu_to_le32(rc->rc_type);
@@ -184,18 +140,10 @@ void dlm_rcom_out(struct dlm_rcom *rc)
rc->rc_id = cpu_to_le64(rc->rc_id);
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) || (type == DLM_RCOM_LOCK_REPLY))
- rcom_lock_out((struct rcom_lock *) rc->rc_buf);
-
- else if (type == DLM_RCOM_STATUS_REPLY)
- rcom_config_out((struct rcom_config *) rc->rc_buf);
}
void dlm_rcom_in(struct dlm_rcom *rc)
{
- int type;
-
header_in(&rc->rc_header);
rc->rc_type = le32_to_cpu(rc->rc_type);
@@ -203,13 +151,4 @@ void dlm_rcom_in(struct dlm_rcom *rc)
rc->rc_id = le64_to_cpu(rc->rc_id);
rc->rc_seq = le64_to_cpu(rc->rc_seq);
rc->rc_seq_reply = le64_to_cpu(rc->rc_seq_reply);
-
- 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 (type == DLM_RCOM_STATUS_REPLY)
- rcom_config_in((struct rcom_config *) rc->rc_buf);
}
-