struct super_block *sb = ino->i_sb;
int bits = PAGE_SHIFT - sb->s_blocksize_bits;
loff_t size = i_size_read(ino);
- loff_t start = page_index(page) << PAGE_SHIFT;
+ loff_t start = (loff_t)page_index(page) << PAGE_SHIFT;
if (PagePrivate(page)) {
int i;
dprintk("got the inode\n");
/* Minor optimisation for files that have shrunk */
if (LAFSI(ino)->type >= TypeBase &&
- (bnum << ino->i_blkbits) >= i_size_read(ino))
+ ((loff_t)bnum << ino->i_blkbits) >= i_size_read(ino))
goto skip;
b = lafs_get_block(ino, bnum, NULL, GFP_NOFS,
MKREF(cleaning));
if (!test_bit(B_Index, &b->flags)) {
if (LAFSI(b->inode)->type >= TypeBase) {
u64 size = b->inode->i_size;
- if (size > (b->fileaddr << blkbits) &&
- size <= ((b->fileaddr + 1) << blkbits))
+ if (size > ((loff_t)b->fileaddr << blkbits) &&
+ size <= ((loff_t)(b->fileaddr + 1) << blkbits))
desc_start->block_bytes =
cpu_to_le32(size & ((1<<blkbits)-1));
else
* this change into the datablock?
*/
if (li->type >= TypeBase &&
- inode->i_size <= (bnum << inode->i_blkbits))
- inode->i_size = ((bnum) << inode->i_blkbits) + type;
+ inode->i_size <= ((loff_t)bnum << inode->i_blkbits))
+ inode->i_size = ((loff_t)bnum << inode->i_blkbits) + type;
/* FIXME: we pretend this is a dirty, pinned block
* so the lower-level code doesn't get confused.
if (le64_to_cpu(db->devaddr[1]) <
le64_to_cpu(db->segment_offset) +
- (((le32_to_cpu(db->segment_count) * le32_to_cpu(db->segment_size)))
+ ((((sector_t)le32_to_cpu(db->segment_count)
+ * le32_to_cpu(db->segment_size)))
<< le32_to_cpu(db->blockbits)))
return 0;