From: akpm@linux-foundation.org Subject: + ocfs2-break-useless-while-loop.patch added to -mm tree Date: Fri, 13 Sep 2013 15:51:43 -0700 Message-ID: <523396ff.6Gme15nFlVuCMoDz%akpm@linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:39395 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755452Ab3IMWvo (ORCPT ); Fri, 13 Sep 2013 18:51:44 -0400 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org, sunil.mushran@gmail.com, mfasheh@suse.com, jlbec@evilplan.org, junxiao.bi@oracle.com Subject: + ocfs2-break-useless-while-loop.patch added to -mm tree To: junxiao.bi@oracle.com,jlbec@evilplan.org,mfasheh@suse.com,sunil.mushran@gmail.com From: akpm@linux-foundation.org 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 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 Acked-by: Sunil Mushran Cc: Joel Becker Cc: Mark Fasheh Signed-off-by: Andrew Morton --- 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@oracle.com are origin.patch ocfs2-update-inode-size-after-zeronig-the-hole.patch ocfs2-break-useless-while-loop.patch linux-next.patch