aboutsummaryrefslogtreecommitdiff
path: root/fs/ext4/ialloc.c
diff options
context:
space:
mode:
authorJohann Lombardi <johann@Sun.COM>2009-07-05 23:45:11 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-07-05 23:45:11 -0400
commite6462869e4fd88be5141a356ee0c28d8067340cc (patch)
treef22c68d85bc9192944d81dd0cec4b8c7f6827b9a /fs/ext4/ialloc.c
parent5adfee9c17314c1411095c23191c3cb0c2d25f9f (diff)
ext4: Fix goal inum check in the inode allocator
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>
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r--fs/ext4/ialloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 2f645732e3b..29e6dc7299b 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -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;