Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80620
b: refs/heads/master
c: dbcfc34
h: refs/heads/master
v: v3
  • Loading branch information
David Teigland committed Jan 30, 2008
1 parent 4263622 commit 061c260
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2a79289e87f3b6487b5fd23c8569f32097057fb4
refs/heads/master: dbcfc34733d1ae37e7a78c9e4e5325451223a5eb
25 changes: 5 additions & 20 deletions trunk/fs/dlm/rcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
*******************************************************************************
**
** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
** Copyright (C) 2005-2007 Red Hat, Inc. All rights reserved.
** Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved.
**
** This copyrighted material is made available to anyone wishing to use,
** modify, copy, or redistribute it subject to the terms and conditions
Expand Down Expand Up @@ -197,11 +197,6 @@ static void receive_sync_reply(struct dlm_ls *ls, struct dlm_rcom *rc_in)
spin_unlock(&ls->ls_rcom_spin);
}

static void receive_rcom_status_reply(struct dlm_ls *ls, struct dlm_rcom *rc_in)
{
receive_sync_reply(ls, rc_in);
}

int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name, int last_len)
{
struct dlm_rcom *rc;
Expand Down Expand Up @@ -254,11 +249,6 @@ static void receive_rcom_names(struct dlm_ls *ls, struct dlm_rcom *rc_in)
send_rcom(ls, mh, rc);
}

static void receive_rcom_names_reply(struct dlm_ls *ls, struct dlm_rcom *rc_in)
{
receive_sync_reply(ls, rc_in);
}

int dlm_send_rcom_lookup(struct dlm_rsb *r, int dir_nodeid)
{
struct dlm_rcom *rc;
Expand Down Expand Up @@ -381,11 +371,6 @@ static void receive_rcom_lock(struct dlm_ls *ls, struct dlm_rcom *rc_in)
send_rcom(ls, mh, rc);
}

static void receive_rcom_lock_reply(struct dlm_ls *ls, struct dlm_rcom *rc_in)
{
dlm_recover_process_copy(ls, rc_in);
}

/* If the lockspace doesn't exist then still send a status message
back; it's possible that it just doesn't have its global_id yet. */

Expand Down Expand Up @@ -481,23 +466,23 @@ void dlm_receive_rcom(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid)
break;

case DLM_RCOM_STATUS_REPLY:
receive_rcom_status_reply(ls, rc);
receive_sync_reply(ls, rc);
break;

case DLM_RCOM_NAMES_REPLY:
receive_rcom_names_reply(ls, rc);
receive_sync_reply(ls, rc);
break;

case DLM_RCOM_LOOKUP_REPLY:
receive_rcom_lookup_reply(ls, rc);
break;

case DLM_RCOM_LOCK_REPLY:
receive_rcom_lock_reply(ls, rc);
dlm_recover_process_copy(ls, rc);
break;

default:
DLM_ASSERT(0, printk("rc_type=%x\n", rc->rc_type););
log_error(ls, "receive_rcom bad type %d", rc->rc_type);
}
out:
return;
Expand Down
16 changes: 5 additions & 11 deletions trunk/fs/dlm/util.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/******************************************************************************
*******************************************************************************
**
** Copyright (C) 2005 Red Hat, Inc. All rights reserved.
** Copyright (C) 2005-2008 Red Hat, Inc. All rights reserved.
**
** This copyrighted material is made available to anyone wishing to use,
** modify, copy, or redistribute it subject to the terms and conditions
Expand Down Expand Up @@ -85,9 +85,7 @@ static int from_dlm_errno(int err)

void dlm_message_out(struct dlm_message *ms)
{
struct dlm_header *hd = (struct dlm_header *) ms;

header_out(hd);
header_out(&ms->m_header);

ms->m_type = cpu_to_le32(ms->m_type);
ms->m_nodeid = cpu_to_le32(ms->m_nodeid);
Expand All @@ -111,9 +109,7 @@ void dlm_message_out(struct dlm_message *ms)

void dlm_message_in(struct dlm_message *ms)
{
struct dlm_header *hd = (struct dlm_header *) ms;

header_in(hd);
header_in(&ms->m_header);

ms->m_type = le32_to_cpu(ms->m_type);
ms->m_nodeid = le32_to_cpu(ms->m_nodeid);
Expand Down Expand Up @@ -179,10 +175,9 @@ static void rcom_config_in(struct rcom_config *rf)

void dlm_rcom_out(struct dlm_rcom *rc)
{
struct dlm_header *hd = (struct dlm_header *) rc;
int type = rc->rc_type;

header_out(hd);
header_out(&rc->rc_header);

rc->rc_type = cpu_to_le32(rc->rc_type);
rc->rc_result = cpu_to_le32(rc->rc_result);
Expand All @@ -199,10 +194,9 @@ void dlm_rcom_out(struct dlm_rcom *rc)

void dlm_rcom_in(struct dlm_rcom *rc)
{
struct dlm_header *hd = (struct dlm_header *) rc;
int type;

header_in(hd);
header_in(&rc->rc_header);

rc->rc_type = le32_to_cpu(rc->rc_type);
rc->rc_result = le32_to_cpu(rc->rc_result);
Expand Down

0 comments on commit 061c260

Please sign in to comment.