* [Ocfs2-devel] [PATCH] ocfs2: remove bogus check in dlm_process_recovery_data
@ 2014-12-17 0:50 Joseph Qi
2014-12-19 1:01 ` Mark Fasheh
0 siblings, 1 reply; 2+ messages in thread
From: Joseph Qi @ 2014-12-17 0:50 UTC (permalink / raw)
To: ocfs2-devel
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@huawei.com>
Reviewed-by: Alex Chen <alex.chen@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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-19 1:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17 0:50 [Ocfs2-devel] [PATCH] ocfs2: remove bogus check in dlm_process_recovery_data Joseph Qi
2014-12-19 1:01 ` Mark Fasheh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.