aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmdebug.c
diff options
context:
space:
mode:
authorSunil Mushran <sunil.mushran@oracle.com>2009-02-26 18:00:38 -0500
committerMark Fasheh <mfasheh@suse.com>2009-04-03 14:39:18 -0400
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 b32f60a5acf..c82feb7b00b 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)
288{ 288{
289 int out = 0; 289 int out = 0;
290 unsigned int namelen; 290 unsigned int namelen;
291 const char *name; 291 unsigned char *name;
292 char *mle_type; 292 char *mle_type;
293 293
294 if (mle->type != DLM_MLE_MASTER) { 294 if (mle->type != DLM_MLE_MASTER) {
295 namelen = mle->u.name.len; 295 name = mle->u.mlename.name;
296 name = mle->u.name.name; 296 namelen = mle->u.mlename.len;
297 } else { 297 } else {
298 namelen = mle->u.res->lockname.len; 298 name = (unsigned char *)mle->u.mleres->lockname.name;
299 name = mle->u.res->lockname.name; 299 namelen = mle->u.mleres->lockname.len;
300 } 300 }
301 301
302 if (mle->type == DLM_MLE_BLOCK) 302 if (mle->type == DLM_MLE_BLOCK)