Skip to contentSkip to conversation

fs/dlm: Remove NULL check.

PATCH New Sean Fu 1 participant 1 message Aug 13, 2018 Distributed lock manager (DLM)

lore
Share & tools
lore

Sean Fu

author
#0 lore raw

PATCH 1/1 fs/dlm: Remove NULL check.

Remove unnessesary NULL check before kmem_cache_destroy() in fs/dlm/memory.c

---
 fs/dlm/memory.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
fs/dlm/memory.c +2 -4
index 7cd24bc..0349c89 100644
@@ -38,10 +38,8 @@ int __init dlm_memory_init(void)
 
 void dlm_memory_exit(void)
 {
-	if (lkb_cache)
-		kmem_cache_destroy(lkb_cache);
-	if (rsb_cache)
-		kmem_cache_destroy(rsb_cache);
+	kmem_cache_destroy(lkb_cache);
+	kmem_cache_destroy(rsb_cache);
 }
 
 char *dlm_allocate_lvb(struct dlm_ls *ls)
Signature · 1 line
2.6.2