From: piaojun Date: Tue, 13 Dec 2016 00:41:14 +0000 (-0800) Subject: ocfs2/dlm: clean up deadcode in dlm_master_request_handler() X-Git-Tag: v4.10-rc1~171^2~110 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=28bb5ef485d3e96da056124e9b60df4486d38265;p=uclinux-h8%2Flinux.git ocfs2/dlm: clean up deadcode in dlm_master_request_handler() When 'dispatch_assert' is set, 'response' must be DLM_MASTER_RESP_YES, and 'res' won't be null, so execution can't reach these two branch. Link: http://lkml.kernel.org/r/58174C91.3040004@huawei.com Signed-off-by: Jun Piao Reviewed-by: Joseph Qi Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 0487dbcd17e0..a464c8088170 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c @@ -1641,12 +1641,6 @@ send_response: * dlm_assert_master_worker() isn't called, we drop it here. */ if (dispatch_assert) { - if (response != DLM_MASTER_RESP_YES) - mlog(ML_ERROR, "invalid response %d\n", response); - if (!res) { - mlog(ML_ERROR, "bad lockres while trying to assert!\n"); - BUG(); - } mlog(0, "%u is the owner of %.*s, cleaning everyone else\n", dlm->node_num, res->lockname.len, res->lockname.name); spin_lock(&res->spinlock);