Message ID | 5490D357.1080506@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Dec 17, 2014 at 08:50:31AM +0800, Joseph Qi wrote: > 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> Reviewed-by: Mark Fasheh <mfasheh@suse.de> --Mark -- Mark Fasheh
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; }