[Ocfs2-devel] [PATCH] ocfs2: remove bogus check in dlm_process_recovery_data

Joseph Qi joseph.qi at huawei.com
Tue Dec 16 16:50:31 PST 2014


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.

Signed-off-by: Joseph Qi <joseph.qi at huawei.com>
Reviewed-by: Alex Chen <alex.chen at huawei.com>
---
 fs/ocfs2/dlm/dlmrecovery.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index 3365839..a239010 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -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;
 }
-- 
1.8.4.3




More information about the Ocfs2-devel mailing list