Commit ed3ce80a52c4658f48ef8fc825bdedf8b3fcaa89
Committed by
Theodore Ts'o
1 parent
9b940f8e8c
Exists in
master
and in
39 other branches
ext4: don't warn about mnt_count if it has been disabled
Currently, if we mkfs a new ext4 volume with s_max_mnt_count set to zero, and mount it for the first time, we will get the warning: maximal mount count reached, running e2fsck is recommended It is really misleading. So change the check so that it won't warn in that case. Signed-off-by: Tao Ma <boyu.mt@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
fs/ext4/super.c
... | ... | @@ -1914,7 +1914,7 @@ |
1914 | 1914 | ext4_msg(sb, KERN_WARNING, |
1915 | 1915 | "warning: mounting fs with errors, " |
1916 | 1916 | "running e2fsck is recommended"); |
1917 | - else if ((__s16) le16_to_cpu(es->s_max_mnt_count) >= 0 && | |
1917 | + else if ((__s16) le16_to_cpu(es->s_max_mnt_count) > 0 && | |
1918 | 1918 | le16_to_cpu(es->s_mnt_count) >= |
1919 | 1919 | (unsigned short) (__s16) le16_to_cpu(es->s_max_mnt_count)) |
1920 | 1920 | ext4_msg(sb, KERN_WARNING, |