diff mbox

ocfs2: Delete redundant code and set the node bit into maybe_map directly.

Message ID 71604351584F6A4EBAE558C676F37CA4A3D490DD@H3CMLB12-EX.srv.huawei-3com.com (mailing list archive)
State New, archived
Headers show

Commit Message

Guozhonghua Oct. 28, 2016, 2:19 a.m. UTC
The variables set_maybe is redundant while mle had been found in the map. So it is ok to set the node_idx into mle's maybe_map directly.
This patch is based on linux-4.9-rc2.

Signed-off-by: Guozhonghua <guozhonghua@h3c.com>


-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有杭州华三通信技术有限公司的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
diff mbox

Patch

--- ocfs2.orig/dlm/dlmmaster.c  2016-10-28 09:35:55.180696409 +0800
+++ ocfs2/dlm/dlmmaster.c       2016-10-28 09:40:19.020703391 +0800
@@ -1609,8 +1609,6 @@  way_up_top:
                __dlm_insert_mle(dlm, mle);
                response = DLM_MASTER_RESP_NO;
        } else {
-               // mlog(0, "mle was found\n");
-               set_maybe = 1;
                spin_lock(&tmpmle->spinlock);
                if (tmpmle->master == dlm->node_num) {
                        mlog(ML_ERROR, "no lockres, but an mle with this node as master!\n");
@@ -1625,8 +1623,7 @@  way_up_top:
                        response = DLM_MASTER_RESP_NO;
                } else
                        response = DLM_MASTER_RESP_MAYBE;
-               if (set_maybe)
-                       set_bit(request->node_idx, tmpmle->maybe_map);
+               set_bit(request->node_idx, tmpmle->maybe_map);
                spin_unlock(&tmpmle->spinlock);
        }
        spin_unlock(&dlm->master_lock);