Skip to contentSkip to conversation

ocfs2: remove unused code in dlm_new_lockres()

PATCH New Xue jiufei 1 participant 1 message Sep 1, 2014 OCFS2

lore
Share & tools
lore

Xue jiufei

author
#0 lore raw

PATCH 1/1 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.

---
 fs/ocfs2/dlm/dlmmaster.c | 3 ---
 1 file changed, 3 deletions(-)
fs/ocfs2/dlm/dlmmaster.c +0 -3
index 3ec906e..73a5013 100644
@@ -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;
Signature · 1 line
1.8.4.3