ocfs2: break useless while loop
PATCH 1/1 ocfs2: break useless while loop
--- fs/ocfs2/dlm/dlmmaster.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/ocfs2/dlm/dlmmaster.c +3 -1
@@ -1888,8 +1888,10 @@ ok:* up nodes that this node contacted */ while ((nn =find_next_bit (mle->response_map,O2NM_MAX_NODES , nn+1 )) <O2NM_MAX_NODES ) { -if (nn != dlm->node_num && nn != assert->node_idx) +if (nn != dlm->node_num && nn != assert->node_idx) { master_request =1 ; +break ; + } } } mle->master = assert->node_idx;
Signature · 1 line
1.7.9.5
Joel Becker
maintainerPATCH 1/1 ocfs2: break useless while loop
Quoted 10 lines · Junxiao Bi
Signed-off-by Junxiao Bi <[email protected]>--- fs/ocfs2/dlm/dlmmaster.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fs/ocfs2/dlm/dlmmaster.c +0
-0
fs/ocfs2/dlm/dlmmaster.c ok: · line 1894
Quoted 8 lines
fs/ocfs2/dlm/dlmmaster.c +3
-1@@ -1888,8 +1888,10 @@ ok:* up nodes that this node contacted */ while ((nn =find_next_bit (mle->response_map,O2NM_MAX_NODES , nn+1 )) <O2NM_MAX_NODES ) { -if (nn != dlm->node_num && nn != assert->node_idx) +if (nn != dlm->node_num && nn != assert->node_idx) { master_request =1 ; +break ; + }
Seems like this will save a tiny bit of CPU in the assert master
handler. Sunil, can you see any problem?
Joel
Quoted 6 lines
fs/ocfs2/dlm/dlmmaster.c +0
-0} } mle->master = assert->node_idx;Signature · 1 line
1.7.9.5
Signature · 8 lines
"To announce that there must be no criticism of them president, or that we are to stand by the president, right or wrong, is not only unpatriotic and servile, but is morally treasonable to the American public." - Theodore Roosevelt http://www.jlbec.org/ jlbec at evilplan.org
PATCH 1/1 ocfs2: break useless while loop
Quoted 18 lines · Joel Becker
fs/ocfs2/dlm/dlmmaster.c ok: · line 1889
Quoted 12 lines · Junxiao Bi
Signed-off-by Junxiao Bi <[email protected]>--- fs/ocfs2/dlm/dlmmaster.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fs/ocfs2/dlm/dlmmaster.c +0
-0@@ -1888,8 +1888,10 @@ ok:* up nodes that this node contacted */ while ((nn = find_next_bit (mle->response_map,
O2NM_MAX_NODES,fs/ocfs2/dlm/dlmmaster.c ok: · line 1890
Quoted 1 line
fs/ocfs2/dlm/dlmmaster.c +0
-0nn+1)) <
O2NM_MAX_NODES) {fs/ocfs2/dlm/dlmmaster.c ok: · line 1891
Quoted 1 line
fs/ocfs2/dlm/dlmmaster.c +0
-1- if (nn != dlm->node_num && nn !=
assert->node_idx)
Quoted 10 lines
fs/ocfs2/dlm/dlmmaster.c ok: · line 1891
Quoted 1 line
fs/ocfs2/dlm/dlmmaster.c +1
-0+ if (nn != dlm->node_num && nn !=
assert->node_idx) {fs/ocfs2/dlm/dlmmaster.c ok: · line 1894
Quoted 3 lines
fs/ocfs2/dlm/dlmmaster.c +2
-0master_request =1 ; +break ; + }Seems like this will save a tiny bit of CPU in the assert master
handler. Sunil, can you see any problem?
Looks good to me. ACK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20120719/01a7dfb2/attachment.html
Joel Becker
maintainerPATCH 1/1 ocfs2: break useless while loop
In reply to Junxiao BiQuoted 1 line · Junxiao Bi
Signed-off-by Junxiao Bi <[email protected]>
This patch is now part of the fixes branch of ocfs2.git.
Joel
Quoted 23 lines
--- fs/ocfs2/dlm/dlmmaster.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fs/ocfs2/dlm/dlmmaster.c +3
-1@@ -1888,8 +1888,10 @@ ok:* up nodes that this node contacted */ while ((nn =find_next_bit (mle->response_map,O2NM_MAX_NODES , nn+1 )) <O2NM_MAX_NODES ) { -if (nn != dlm->node_num && nn != assert->node_idx) +if (nn != dlm->node_num && nn != assert->node_idx) { master_request =1 ; +break ; + } } } mle->master = assert->node_idx;Signature · 1 line
1.7.9.5
Signature · 6 lines
"I think it would be a good idea."
- Mahatma Ghandi, when asked what he thought of Western
civilization
http://www.jlbec.org/
jlbec at evilplan.org