[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1305557603-4596-1-git-send-email-tm@tao.ma>
Date: Mon, 16 May 2011 22:53:23 +0800
From: Tao Ma <tm@....ma>
To: linux-ext4@...r.kernel.org
Subject: [PATCH] ext4: Don't warn about mnt_count after the first mount of a new mkfsed volume.
From: Tao Ma <boyu.mt@...bao.com>
Currently, if we mkfs a new ext4 volume and mount it for the first time,
we will get the warning in the message like
warning: maximal mount count reached, running e2fsck is recommended
It is really misleading. So change the check so that it wouldn't warn in that case.
Signed-off-by: Tao Ma <boyu.mt@...bao.com>
---
fs/ext4/super.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e29535c..92166b7 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1900,7 +1900,7 @@ static int ext4_setup_super(struct super_block *sb, struct ext4_super_block *es,
ext4_msg(sb, KERN_WARNING,
"warning: mounting fs with errors, "
"running e2fsck is recommended");
- else if ((__s16) le16_to_cpu(es->s_max_mnt_count) >= 0 &&
+ else if ((__s16) le16_to_cpu(es->s_max_mnt_count) > 0 &&
le16_to_cpu(es->s_mnt_count) >=
(unsigned short) (__s16) le16_to_cpu(es->s_max_mnt_count))
ext4_msg(sb, KERN_WARNING,
--
1.7.4
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists