From: Huaisheng Ye <yehs2007-ytc+IHgoah0@public.gmane.org>
To: dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org,
chengnt-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org,
jack-IBi9RG/b67k@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 2/3] fs/ext2/inode: Fix a type cast error for fsdax
Date: Sun, 1 Jul 2018 14:18:47 +0800 [thread overview]
Message-ID: <20180701061848.7036-2-yehs2007@zoho.com> (raw)
In-Reply-To: <20180701061848.7036-1-yehs2007-ytc+IHgoah0@public.gmane.org>
From: Huaisheng Ye <yehs1-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org>
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-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org>
---
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
next prev parent reply other threads:[~2018-07-01 6:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-01 6:18 [PATCH 1/3] drivers/dax/super: Add annotation for ops in struct dax_device Huaisheng Ye
[not found] ` <20180701061848.7036-1-yehs2007-ytc+IHgoah0@public.gmane.org>
2018-07-01 6:18 ` Huaisheng Ye [this message]
[not found] ` <20180701061848.7036-2-yehs2007-ytc+IHgoah0@public.gmane.org>
2018-07-01 19:26 ` [PATCH 2/3] fs/ext2/inode: Fix a type cast error for fsdax Al Viro
[not found] ` <20180701192600.GT30522-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2018-07-02 6:23 ` Huaisheng Ye
[not found] ` <16459a9432e.10c419704327.5268154349116077352-ytc+IHgoah0@public.gmane.org>
2018-07-02 7:55 ` Jan Kara
2018-07-01 6:18 ` [PATCH 3/3] fs/ext2/inode: Optimize the condition for iomap_begin Huaisheng Ye
[not found] ` <20180701061848.7036-3-yehs2007-ytc+IHgoah0@public.gmane.org>
2018-07-02 7:57 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180701061848.7036-2-yehs2007@zoho.com \
--to=yehs2007-ytc+ihgoah0@public.gmane.org \
--cc=chengnt-6jq1YtArVR3QT0dZR+AlfA@public.gmane.org \
--cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=jack-IBi9RG/b67k@public.gmane.org \
--cc=linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nvdimm-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org \
--cc=willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).