Skip to contentSkip to conversation

+ ocfs2-break-useless-while-loop.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Sep 13, 2013 OCFS2

lore
Share & tools
lore
#0 lore raw

Subject: + ocfs2-break-useless-while-loop.patch added to -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
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 <[email protected]>
Subject: ocfs2: break useless while loop

Break the while loop after get the value, or it will waste cpu time.

---

 fs/ocfs2/dlm/dlmmaster.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/ocfs2/dlm/dlmmaster.c renamed from fs/ocfs2/dlm/dlmmaster.c~ocfs2-break-useless-while-loop +3 -1
diff -puN fs/ocfs2/dlm/dlmmaster.c~ocfs2-break-useless-while-loop 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 [email protected] are

origin.patch ocfs2-update-inode-size-after-zeronig-the-hole.patch ocfs2-break-useless-while-loop.patch linux-next.patch