Subject: + ocfs2-break-useless-while-loop.patch added to -mm tree To: junxiao.bi@xxxxxxxxxx,jlbec@xxxxxxxxxxxx,mfasheh@xxxxxxxx,sunil.mushran@xxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Fri, 13 Sep 2013 15:51:43 -0700 The patch titled Subject: ocfs2: break useless while loop has been added to the -mm tree. Its filename is ocfs2-break-useless-while-loop.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-break-useless-while-loop.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-break-useless-while-loop.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Junxiao Bi <junxiao.bi@xxxxxxxxxx> Subject: ocfs2: break useless while loop Break the while loop after get the value, or it will waste cpu time. Signed-off-by: Junxiao Bi <junxiao.bi@xxxxxxxxxx> Acked-by: Sunil Mushran <sunil.mushran@xxxxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Cc: Mark Fasheh <mfasheh@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/dlm/dlmmaster.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN fs/ocfs2/dlm/dlmmaster.c~ocfs2-break-useless-while-loop fs/ocfs2/dlm/dlmmaster.c --- a/fs/ocfs2/dlm/dlmmaster.c~ocfs2-break-useless-while-loop +++ a/fs/ocfs2/dlm/dlmmaster.c @@ -1885,8 +1885,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; _ Patches currently in -mm which might be from junxiao.bi@xxxxxxxxxx are origin.patch ocfs2-update-inode-size-after-zeronig-the-hole.patch ocfs2-break-useless-while-loop.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html