[Ocfs2-devel] 答复: [PATCH] ocfs2: oldmle should be put while -EEXIST returned, and the new mle should not be get once at that time.

Guozhonghua guozhonghua at h3c.com
Tue Sep 13 20:41:05 PDT 2016


Hi, Joseph

I reviewed the patch of 32e493265b2b.
If the ret is --EEXIST, the oldmle will not be put.

As the fucntion dlm_add_migration_mle called, the return value is -EEXIST.
The oldmle had been gotten once and goto fail.

The fail code, ret is -EEXIST, so there is not anyway for the oldmle to be put.
fail:
        if (ret != -EEXIST && oldmle) {
                /* master is known, detach if not already detached */
                dlm_mle_detach_hb_events(dlm, oldmle);
                dlm_put_mle(oldmle);
        }

Same thing, the new mle is allocated
It will not initialized with the ret --EEXIST while call dlm_add_migration_mle.
So it is wrong to call dlm_get_mle_inuse(mle) for the new mle before goto fail.

I review these code and find that is not well.
Please have a check, and your comments will be good for me.
Thank You.

-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有杭州华三通信技术有限公司的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
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!


More information about the Ocfs2-devel mailing list