diff options
author | Oleg Drokin <green@linuxhacker.ru> | 2005-11-28 22:43:53 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-28 23:42:23 +0100 |
commit | 7729ac5efe156129d172784fedeaddb2167a1914 (patch) | |
tree | f0d28ced93c3482988e3e935e4a67ac4eed4f20a /fs/reiserfs/inode.c | |
parent | [PATCH] Console rotation fixes (diff) | |
download | linux-7729ac5efe156129d172784fedeaddb2167a1914.tar.xz linux-7729ac5efe156129d172784fedeaddb2167a1914.zip |
[PATCH] reiserfs: fix 32-bit overflow in map_block_for_writepage()
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>
Diffstat (limited to 'fs/reiserfs/inode.c')
-rw-r--r-- | fs/reiserfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 5f82352b97e1..0a044ad98885 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c @@ -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; |