aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-10-03 16:31:08 -0400
committerChris Mason <chris.mason@oracle.com>2008-10-03 16:31:08 -0400
commita62b940160d8125016e85046e68ae621c99e751f (patch)
treec26ebe1ccf229f829513e1fc85c8110928187e13 /fs/btrfs/volumes.c
parent30c43e2444c16afe3b2130f40ad273541bf3dc36 (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/volumes.c')
-rw-r--r--fs/btrfs/volumes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f63cf7621a01..2eed7f91f51a 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2187,7 +2187,7 @@ int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio,
2187 struct btrfs_mapping_tree *map_tree; 2187 struct btrfs_mapping_tree *map_tree;
2188 struct btrfs_device *dev; 2188 struct btrfs_device *dev;
2189 struct bio *first_bio = bio; 2189 struct bio *first_bio = bio;
2190 u64 logical = bio->bi_sector << 9; 2190 u64 logical = (u64)bio->bi_sector << 9;
2191 u64 length = 0; 2191 u64 length = 0;
2192 u64 map_length; 2192 u64 map_length;
2193 struct btrfs_multi_bio *multi = NULL; 2193 struct btrfs_multi_bio *multi = NULL;