summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorXue jiufei <xuejiufei@huawei.com>2014-10-10 00:25:03 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-10 04:25:47 +0200
commit6ae075485e2d91921bdd64e49896b1bae87d1ba2 (patch)
tree10013216bcd1d6918d0f07a96c13bcbec43cc801 /fs/ocfs2
parentocfs2/dlm: call dlm_lockres_put without resource spinlock (diff)
downloadlinux-6ae075485e2d91921bdd64e49896b1bae87d1ba2.tar.xz
linux-6ae075485e2d91921bdd64e49896b1bae87d1ba2.zip
ocfs2: remove unused code in dlm_new_lockres()
Remove the branch that free res->lockname.name because the condition is never satisfied when jump to label error. Signed-off-by: joyce.xue <xuejiufei@huawei.com> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/dlm/dlmmaster.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 12ba682fc53c..215e41abf101 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -625,9 +625,6 @@ struct dlm_lock_resource *dlm_new_lockres(struct dlm_ctxt *dlm,
return res;
error:
- if (res && res->lockname.name)
- kmem_cache_free(dlm_lockname_cache, (void *)res->lockname.name);
-
if (res)
kmem_cache_free(dlm_lockres_cache, res);
return NULL;