diff options
author | Jan Kara <jack@suse.cz> | 2013-05-31 19:33:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-20 17:16:08 -0700 |
commit | df8b4d47fceb1f64ddea20c233e7bb987cbbce19 (patch) | |
tree | 908ebc2e7fabacb83aa7c3e760b02ba9a0f3b371 /fs/ext4 | |
parent | da94067deee6e073129061575d1a3e437232a6c5 (diff) |
ext4: fix data offset overflow on 32-bit archs in ext4_inline_data_fiemap()
commit eaf3793728d07d995f1e74250b2d0005f7ae98b5 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 c0fd1a123f7d..c46a01e58d13 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -1702,7 +1702,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); |