diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-16 10:06:57 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-16 10:06:57 +0300 |
commit | 956f004a044007ea3b8fb19a525535933bb4f2a4 (patch) | |
tree | a8dbe5a16d8786083bd1e3393c36133b74c30691 /fs/ext4/inode.c | |
parent | bfd727f3a59c3696d6fbe086589376a16a5cdf05 (diff) | |
parent | 9d3cce1e8b8561fed5f383d22a4d6949db4eadbe (diff) | |
download | linux-956f004a044007ea3b8fb19a525535933bb4f2a4.tar.xz |
Merge 4.18-rc5 into staging-next
We need the staging fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r-- | fs/ext4/inode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 2ea07efbe016..7d6c10017bdf 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -402,9 +402,9 @@ static int __check_block_validity(struct inode *inode, const char *func, if (!ext4_data_block_valid(EXT4_SB(inode->i_sb), map->m_pblk, map->m_len)) { ext4_error_inode(inode, func, line, map->m_pblk, - "lblock %lu mapped to illegal pblock " + "lblock %lu mapped to illegal pblock %llu " "(length %d)", (unsigned long) map->m_lblk, - map->m_len); + map->m_pblk, map->m_len); return -EFSCORRUPTED; } return 0; @@ -4506,7 +4506,8 @@ static int __ext4_get_inode_loc(struct inode *inode, int inodes_per_block, inode_offset; iloc->bh = NULL; - if (!ext4_valid_inum(sb, inode->i_ino)) + if (inode->i_ino < EXT4_ROOT_INO || + inode->i_ino > le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count)) return -EFSCORRUPTED; iloc->block_group = (inode->i_ino - 1) / EXT4_INODES_PER_GROUP(sb); |