From: Daeseok Youn Date: Tue, 7 Apr 2015 23:43:52 +0000 (+1000) Subject: ocfs2: avoid a pointless delay in o2cb_cluster_check() X-Git-Tag: KARO-TXA5-2015-06-26~18^2~487 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5ee834d20155fd09e00a470f50593f071f7e0a2f;p=karo-tx-linux.git ocfs2: avoid a pointless delay in o2cb_cluster_check() Fix an off-by-one when attempting to avoid an msleep() on the final loop iteration. Signed-off-by: Daeseok Youn Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Andrew Morton --- diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c index 1724d43d3da1..220cae7bbdbc 100644 --- a/fs/ocfs2/stack_o2cb.c +++ b/fs/ocfs2/stack_o2cb.c @@ -295,7 +295,7 @@ static int o2cb_cluster_check(void) set_bit(node_num, netmap); if (!memcmp(hbmap, netmap, sizeof(hbmap))) return 0; - if (i < O2CB_MAP_STABILIZE_COUNT) + if (i < O2CB_MAP_STABILIZE_COUNT - 1) msleep(1000); }