Skip to contentSkip to conversation

ocfs2: remove bogus check in dlm_process_recovery_data

PATCH New Joseph Qi 2 participants 2 messages Dec 17, 2014 – Dec 19, 2014 OCFS2

lore
Share & tools
lore

Joseph Qi

author
#0 lore raw

PATCH 1/1 ocfs2: remove bogus check in dlm_process_recovery_data

In dlm_process_recovery_data, only when dlm_new_lock failed the ret will be set to -ENOMEM. And in this case, newlock is definitely NULL. So test newlock is meaningless, remove it.

---
 fs/ocfs2/dlm/dlmrecovery.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
fs/ocfs2/dlm/dlmrecovery.c +1 -4
index 3365839..a239010 100644
@@ -2015,11 +2015,8 @@ leave:
 	dlm_lockres_drop_inflight_ref(dlm, res);
 	spin_unlock(&res->spinlock);
 
-	if (ret < 0) {
+	if (ret < 0)
 		mlog_errno(ret);
-		if (newlock)
-			dlm_lock_put(newlock);
-	}
 
 	return ret;
 }
Signature · 1 line
1.8.4.3