Skip to content

Commit

Permalink
[PATCH] reiserfs: fix 32-bit overflow in map_block_for_writepage()
Browse files Browse the repository at this point in the history
I now see another overflow in reiserfs that should lead to data corruptions
with files that are bigger than 4G under certain circumstances when using
mmap.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Oleg Drokin authored and Linus Torvalds committed Nov 28, 2005
1 parent 1a9c3f7 commit 7729ac5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/reiserfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2194,7 +2194,7 @@ static int map_block_for_writepage(struct inode *inode,
INITIALIZE_PATH(path);
int pos_in_item;
int jbegin_count = JOURNAL_PER_BALANCE_CNT;
loff_t byte_offset = (block << inode->i_sb->s_blocksize_bits) + 1;
loff_t byte_offset = ((loff_t)block << inode->i_sb->s_blocksize_bits)+1;
int retval;
int use_get_block = 0;
int bytes_copied = 0;
Expand Down

0 comments on commit 7729ac5

Please sign in to comment.