mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
ext4: fix data offset overflow on 32-bit archs in ext4_inline_data_fiemap()
On 32-bit archs when sector_t is defined as 32-bit the logic computing data offset in ext4_inline_data_fiemap(). Fix that by properly typing the shifted value. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
566370a2e5
commit
eaf3793728
1 changed files with 1 additions and 1 deletions
|
@ -1842,7 +1842,7 @@ int ext4_inline_data_fiemap(struct inode *inode,
|
||||||
if (error)
|
if (error)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
physical = iloc.bh->b_blocknr << inode->i_sb->s_blocksize_bits;
|
physical = (__u64)iloc.bh->b_blocknr << inode->i_sb->s_blocksize_bits;
|
||||||
physical += (char *)ext4_raw_inode(&iloc) - iloc.bh->b_data;
|
physical += (char *)ext4_raw_inode(&iloc) - iloc.bh->b_data;
|
||||||
physical += offsetof(struct ext4_inode, i_block);
|
physical += offsetof(struct ext4_inode, i_block);
|
||||||
length = i_size_read(inode);
|
length = i_size_read(inode);
|
||||||
|
|
Loading…
Add table
Reference in a new issue