diff --git a/[refs] b/[refs] index eee086809004..d68d7e65dec8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2f2e09eb15849562aede80ed007658e4504ded26 +refs/heads/master: f4afb4f4e3e9af626ad695c87e4f9aaa780b29ec diff --git a/trunk/fs/ext4/balloc.c b/trunk/fs/ext4/balloc.c index d0f13eada0ed..58339393fa6e 100644 --- a/trunk/fs/ext4/balloc.c +++ b/trunk/fs/ext4/balloc.c @@ -682,11 +682,15 @@ ext4_fsblk_t ext4_count_free_clusters(struct super_block *sb) static inline int test_root(ext4_group_t a, int b) { - int num = b; - - while (a > num) - num *= b; - return num == a; + while (1) { + if (a < b) + return 0; + if (a == b) + return 1; + if ((a % b) != 0) + return 0; + a = a / b; + } } static int ext4_group_sparse(ext4_group_t group)