]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2fsprogs: Unify the upper limit of reserved blocks count
authorKazuya Mio <k-mio@sx.jp.nec.com>
Mon, 18 Apr 2011 20:11:34 +0000 (20:11 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 1 Jun 2011 00:07:38 +0000 (20:07 -0400)
In e2fsprogs, the upper limit of reserved blocks count is a half of
filesystem's blocks count. This patch fixes the incorrect checks of
reserved blocks count.

Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/tune2fs.c

index e5722a5a542b13d557162dd1b34c7546b7c264d3..9d2b12cc2fac00679885b21d677ef5421bda55a0 100644 (file)
@@ -1715,7 +1715,7 @@ retry_open:
                       reserved_ratio, sb->s_r_blocks_count);
        }
        if (r_flag) {
-               if (reserved_blocks >= sb->s_blocks_count/2) {
+               if (reserved_blocks > sb->s_blocks_count/2) {
                        com_err(program_name, 0,
                                _("reserved blocks count is too big (%lu)"),
                                reserved_blocks);