]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ext4: Print the find_group_flex() warning only once
authorTheodore Ts'o <tytso@mit.edu>
Tue, 2 Jun 2009 12:09:15 +0000 (08:09 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Jun 2009 03:01:38 +0000 (20:01 -0700)
(cherry picked from commit 2842c3b5449f31470b61db716f1926b594fb6156)

This is a short-term warning, and even printk_ratelimit() can result
in too much noise in system logs.  So only print it once as a warning.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/ialloc.c

index f9b9fad959dca9dc680d6b3b4984aaa82dd87d66..b9457e1e80f70a821262b5d2048edc887cd9d038 100644 (file)
@@ -687,6 +687,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode * dir, int mode)
        struct inode *ret;
        ext4_group_t i;
        int free = 0;
+       static int once = 1;
        ext4_group_t flex_group;
 
        /* Cannot create files in a deleted directory */
@@ -706,7 +707,8 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode * dir, int mode)
                ret2 = find_group_flex(sb, dir, &group);
                if (ret2 == -1) {
                        ret2 = find_group_other(sb, dir, &group);
-                       if (ret2 == 0 && printk_ratelimit())
+                       if (ret2 == 0 && once)
+                               once = 0;
                                printk(KERN_NOTICE "ext4: find_group_flex "
                                       "failed, fallback succeeded dir %lu\n",
                                       dir->i_ino);