ocfs2: avoid a pointless delay in o2cb_cluster_check()
authorDaeseok Youn <daeseok.youn@gmail.com>
Tue, 14 Apr 2015 22:43:02 +0000 (15:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Apr 2015 23:48:57 +0000 (16:48 -0700)
Fix an off-by-one when attempting to avoid an msleep() on the final loop
iteration.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ocfs2/stack_o2cb.c

index 1724d43d3da1626b517b8deb73cd87c47492fd85..220cae7bbdbcf1e88176505148de97e33645cc66 100644 (file)
@@ -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);
        }