diff options
author | Jan Kara <jack@suse.cz> | 2013-06-01 01:33:42 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-06-01 01:33:42 +0200 |
commit | eaf3793728d07d995f1e74250b2d0005f7ae98b5 (patch) | |
tree | 5058a1f242caacba53cb52f539c16c8e12322497 /fs/ext4 | |
parent | ext4: suppress ext4 orphan messages on mount (diff) | |
download | linux-eaf3793728d07d995f1e74250b2d0005f7ae98b5.tar.xz linux-eaf3793728d07d995f1e74250b2d0005f7ae98b5.zip |
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>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/inline.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index 3e2bf873e8a8..33331b4c2178 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -1842,7 +1842,7 @@ int ext4_inline_data_fiemap(struct inode *inode, if (error) 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 += offsetof(struct ext4_inode, i_block); length = i_size_read(inode); |