diff options
author | Joseph Qi <joseph.qi@huawei.com> | 2015-01-08 17:32:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-01-08 18:10:51 -0500 |
commit | eb4f73b4ca6c04f31af6f1ff1bf11b5020a1216f (patch) | |
tree | 92051ca09f0dcfaa4600c134279461cd25630685 /fs | |
parent | bdec41963890f8ed9ad89f8b418959ab3cdc2aa3 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/dlm/dlmrecovery.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 79b5af5e6a7b..cecd875653e4 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c | |||
@@ -2023,11 +2023,8 @@ leave: | |||
2023 | dlm_lockres_drop_inflight_ref(dlm, res); | 2023 | dlm_lockres_drop_inflight_ref(dlm, res); |
2024 | spin_unlock(&res->spinlock); | 2024 | spin_unlock(&res->spinlock); |
2025 | 2025 | ||
2026 | if (ret < 0) { | 2026 | if (ret < 0) |
2027 | mlog_errno(ret); | 2027 | mlog_errno(ret); |
2028 | if (newlock) | ||
2029 | dlm_lock_put(newlock); | ||
2030 | } | ||
2031 | 2028 | ||
2032 | return ret; | 2029 | return ret; |
2033 | } | 2030 | } |