Hi
1. in the callback o2net_fill_node_map -> o2net_tx_can_proceed()
2. if the function o2net_tx_can_proceed returns false,  then "ret" and sc are 
uninialized,
and re-using the value from the previous iteration.  I think this is not 
reasonable.
I do not know whether to hide a bug.
checking the return value is harmless and robustness.

Finally, any feedback about this process (positive or negative) would be  
greatly appreciated.

/* Get a map of all nodes to which this node is currently connected to */ne
void o2net_fill_node_map(unsigned long *map, unsigned bytes)
{
        struct o2net_sock_container *sc = NULL;
        int node, ret = 0;
        BUG_ON(bytes < (BITS_TO_LONGS(O2NM_MAX_NODES) * sizeof(unsigned long)));
        memset(map, 0, bytes);
        for (node = 0; node < O2NM_MAX_NODES; ++node) {
                if (!o2net_tx_can_proceed(o2net_nn_from_num(node), &sc, &ret))
                        continue;
                if (!ret) {
                        set_bit(node, map);
                        sc_put(sc);
                }
              sc = NULL;
               ret = 0;

}

}

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

Attachment: o2net_fill_node_map reviews, thanks.eml
Description: o2net_fill_node_map reviews, thanks.eml

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

Reply via email to