diff options
author | Sunil Mushran <sunil.mushran@oracle.com> | 2009-02-26 15:00:47 -0800 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-04-03 11:39:23 -0700 |
commit | 7141514b8307734c117f100c4a3637887c5def45 (patch) | |
tree | 8f2944508cdb0dd1ea7288d7300e4c29995c904e /fs/ocfs2/dlm/dlmdebug.c | |
parent | e64ff14607ac90b2f3349550a41cc8dc0c0b1324 (diff) | |
download | linux-7141514b8307734c117f100c4a3637887c5def45.tar.bz2 |
ocfs2/dlm: Remove struct dlm_lock_name in struct dlm_master_list_entry
This patch removes struct dlm_lock_name and adds the entries directly
to struct dlm_master_list_entry. Under the new scheme, both mles that
are backed by a lockres or not, will have the name populated in mle->mname.
This allows us to get rid of code that was figuring out the location of
the mle name.
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.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c index bf9fa270ee98..bdf1c7817bb5 100644 --- a/fs/ocfs2/dlm/dlmdebug.c +++ b/fs/ocfs2/dlm/dlmdebug.c @@ -287,18 +287,8 @@ static int stringify_nodemap(unsigned long *nodemap, int maxnodes, static int dump_mle(struct dlm_master_list_entry *mle, char *buf, int len) { int out = 0; - unsigned int namelen; - unsigned char *name; char *mle_type; - if (mle->type != DLM_MLE_MASTER) { - name = mle->u.mlename.name; - namelen = mle->u.mlename.len; - } else { - name = (unsigned char *)mle->u.mleres->lockname.name; - namelen = mle->u.mleres->lockname.len; - } - if (mle->type == DLM_MLE_BLOCK) mle_type = "BLK"; else if (mle->type == DLM_MLE_MASTER) @@ -306,7 +296,7 @@ static int dump_mle(struct dlm_master_list_entry *mle, char *buf, int len) else mle_type = "MIG"; - out += stringify_lockname(name, namelen, buf + out, len - out); + out += stringify_lockname(mle->mname, mle->mnamelen, buf + out, len - out); out += snprintf(buf + out, len - out, "\t%3s\tmas=%3u\tnew=%3u\tevt=%1d\tuse=%1d\tref=%3d\n", mle_type, mle->master, mle->new_master, |