lkml.org 
[lkml]   [2018]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] fs/ext2/inode: Fix a type cast error for fsdax
On Sun, Jul 01, 2018 at 02:18:47PM +0800, Huaisheng Ye wrote:
> From: Huaisheng Ye <yehs1@lenovo.com>
>
> The type of offset within struct iomap is loff_t, which represents
> file offset of mapping.
>
> In ext2_iomap_begin, iomap->offset shall be given a type cast as
> loff_t instead of u64.

Why is it an error? loff_t is uniformly typedefed to long long.
In which case the second variant is different from the first one
*and* does not step into nasal demon territory?

> - iomap->offset = (u64)first_block << blkbits;
> + iomap->offset = (loff_t)first_block << blkbits;

\
 
 \ /
  Last update: 2018-07-01 21:30    [W:0.072 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site