From f77a9a78c3a1d995b3bf948dbcad5c4a1b2302d5 Mon Sep 17 00:00:00 2001 From: Sunil Mushran Date: Thu, 26 Feb 2009 15:00:38 -0800 Subject: 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 Signed-off-by: Mark Fasheh --- fs/ocfs2/dlm/dlmdebug.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fs/ocfs2/dlm/dlmdebug.c') 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) -- cgit v1.2.1