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>
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index e5c9261..ff0c359 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -386,7 +386,7 @@
{
struct btrfs_root *root = BTRFS_I(page->mapping->host)->root;
struct btrfs_mapping_tree *map_tree;
- u64 logical = bio->bi_sector << 9;
+ u64 logical = (u64)bio->bi_sector << 9;
u64 length = 0;
u64 map_length;
int ret;