summaryrefslogtreecommitdiff
path: root/fs/ocfs2/dlm/dlmdebug.c
diff options
context:
space:
mode:
authorSunil Mushran <sunil.mushran@oracle.com>2009-02-26 15:00:38 -0800
committerMark Fasheh <mfasheh@suse.com>2009-04-03 11:39:18 -0700
commitf77a9a78c3a1d995b3bf948dbcad5c4a1b2302d5 (patch)
treec12f1fa1da0a64693d39a2f98c5a1981bf58a83a /fs/ocfs2/dlm/dlmdebug.c
parent1c0845773ad9f4875603b752235aea8aa04565f3 (diff)
ocfs2/dlm: Clean up struct dlm_lock_name
For master mle, the name it stored in the attached lockres in struct qstr. For block and migration mle, the name is stored inline in struct dlm_lock_name. This patch attempts to make struct dlm_lock_name look like a struct qstr. While we could use struct qstr, we don't because we want to avoid having to malloc and free the lockname string as the mle's lifetime is fairly short. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmdebug.c')
-rw-r--r--fs/ocfs2/dlm/dlmdebug.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c
index b32f60a5acfb..c82feb7b00b9 100644
--- a/fs/ocfs2/dlm/dlmdebug.c
+++ b/fs/ocfs2/dlm/dlmdebug.c
@@ -288,15 +288,15 @@ static int dump_mle(struct dlm_master_list_entry *mle, char *buf, int len)
{
int out = 0;
unsigned int namelen;
- const char *name;
+ unsigned char *name;
char *mle_type;
if (mle->type != DLM_MLE_MASTER) {
- namelen = mle->u.name.len;
- name = mle->u.name.name;
+ name = mle->u.mlename.name;
+ namelen = mle->u.mlename.len;
} else {
- namelen = mle->u.res->lockname.len;
- name = mle->u.res->lockname.name;
+ name = (unsigned char *)mle->u.mleres->lockname.name;
+ namelen = mle->u.mleres->lockname.len;
}
if (mle->type == DLM_MLE_BLOCK)