From: Daeseok Youn Date: Tue, 14 Apr 2015 22:43:02 +0000 (-0700) Subject: ocfs2: avoid a pointless delay in o2cb_cluster_check() X-Git-Tag: v5.15~15988^2~110 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a8346429d6da4039a4687a8a07f3f8cdaf96d92;p=platform%2Fkernel%2Flinux-starfive.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 Signed-off-by: Linus Torvalds --- diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c index 1724d43..220cae7 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); }