Skip to content

Commit eb4f73b

Browse files
josephhztorvalds
authored andcommitted
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. Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Reviewed-by: Alex Chen <alex.chen@huawei.com> Reviewed-by: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent bdec419 commit eb4f73b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

fs/ocfs2/dlm/dlmrecovery.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,11 +2023,8 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
20232023
dlm_lockres_drop_inflight_ref(dlm, res);
20242024
spin_unlock(&res->spinlock);
20252025

2026-
if (ret < 0) {
2026+
if (ret < 0)
20272027
mlog_errno(ret);
2028-
if (newlock)
2029-
dlm_lock_put(newlock);
2030-
}
20312028

20322029
return ret;
20332030
}

0 commit comments

Comments
 (0)