mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
5adfee9c17
commit
e6462869e4
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue