diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-10-03 16:31:08 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-10-03 16:31:08 -0400 |
commit | a62b940160d8125016e85046e68ae621c99e751f (patch) | |
tree | c26ebe1ccf229f829513e1fc85c8110928187e13 /fs/btrfs/inode.c | |
parent | 30c43e2444c16afe3b2130f40ad273541bf3dc36 (diff) |
Btrfs: cast bio->bi_sector to a u64 before shifting
On 32 bit machines without CONFIG_LBD, the bi_sector field is only 32 bits.
Btrfs needs to cast it before shifting up, or we end up doing IO into
the wrong place.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index e5c9261dcbaa..ff0c35976657 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -386,7 +386,7 @@ int btrfs_merge_bio_hook(struct page *page, unsigned long offset, | |||
386 | { | 386 | { |
387 | struct btrfs_root *root = BTRFS_I(page->mapping->host)->root; | 387 | struct btrfs_root *root = BTRFS_I(page->mapping->host)->root; |
388 | struct btrfs_mapping_tree *map_tree; | 388 | struct btrfs_mapping_tree *map_tree; |
389 | u64 logical = bio->bi_sector << 9; | 389 | u64 logical = (u64)bio->bi_sector << 9; |
390 | u64 length = 0; | 390 | u64 length = 0; |
391 | u64 map_length; | 391 | u64 map_length; |
392 | int ret; | 392 | int ret; |