ext4: Fix goal inum check in the inode allocator
authorJohann Lombardi <johann@Sun.COM>
Mon, 6 Jul 2009 03:45:11 +0000 (23:45 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 6 Jul 2009 03:45:11 +0000 (23:45 -0400)
The goal inode is specificed by inode number which belongs
to [1; s_inodes_count].

Signed-off-by: Johann Lombardi <johann@sun.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ialloc.c

index 2f645732e3b76ef84e76f58761c16116825c2763..29e6dc7299b8b6186cf46a39deac0a88594b6028 100644 (file)
@@ -833,7 +833,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode,
        if (!goal)
                goal = sbi->s_inode_goal;
 
-       if (goal && goal < le32_to_cpu(sbi->s_es->s_inodes_count)) {
+       if (goal && goal <= le32_to_cpu(sbi->s_es->s_inodes_count)) {
                group = (goal - 1) / EXT4_INODES_PER_GROUP(sb);
                ino = (goal - 1) % EXT4_INODES_PER_GROUP(sb);
                ret2 = 0;
This page took 0.027796 seconds and 5 git commands to generate.