[PATCH 2/3] fs/ext2/inode: Fix a type cast error for fsdax
From: Huaisheng Ye
Date: Sun Jul 01 2018 - 02:35:55 EST
From: Huaisheng Ye <yehs1@xxxxxxxxxx>
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.
Signed-off-by: Huaisheng Ye <yehs1@xxxxxxxxxx>
---
fs/ext2/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 7163590..ca211bd 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -816,7 +816,7 @@ static int ext2_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
iomap->flags = 0;
iomap->bdev = inode->i_sb->s_bdev;
- iomap->offset = (u64)first_block << blkbits;
+ iomap->offset = (loff_t)first_block << blkbits;
iomap->dax_dev = sbi->s_daxdev;
if (ret == 0) {
--
1.8.3.1