From mboxrd@z Thu Jan 1 00:00:00 1970 From: Huaisheng Ye Subject: [PATCH 2/3] fs/ext2/inode: Fix a type cast error for fsdax Date: Sun, 1 Jul 2018 14:18:47 +0800 Message-ID: <20180701061848.7036-2-yehs2007@zoho.com> References: <20180701061848.7036-1-yehs2007@zoho.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 To: dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org Return-path: In-Reply-To: <20180701061848.7036-1-yehs2007-ytc+IHgoah0@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces-hn68Rpc1hR1g9hUCZPvPmw@public.gmane.org Sender: "Linux-nvdimm" List-Id: linux-ext4.vger.kernel.org From: Huaisheng Ye 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 --- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender-pp-092.zoho.com (sender-pp-092.zoho.com [135.84.80.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2C68A20336AD2 for ; Sat, 30 Jun 2018 23:19:54 -0700 (PDT) From: Huaisheng Ye Subject: [PATCH 2/3] fs/ext2/inode: Fix a type cast error for fsdax Date: Sun, 1 Jul 2018 14:18:47 +0800 Message-Id: <20180701061848.7036-2-yehs2007@zoho.com> In-Reply-To: <20180701061848.7036-1-yehs2007@zoho.com> References: <20180701061848.7036-1-yehs2007@zoho.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" To: dan.j.williams@intel.com Cc: linux-nvdimm@lists.01.org, chengnt@lenovo.com, jack@suse.com, linux-kernel@vger.kernel.org, willy@infradead.org, linux-ext4@vger.kernel.org List-ID: From: Huaisheng Ye 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 --- 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 _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2782C6778A for ; Sun, 1 Jul 2018 06:35:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 610D725262 for ; Sun, 1 Jul 2018 06:35:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 610D725262 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zoho.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752146AbeGAGfZ (ORCPT ); Sun, 1 Jul 2018 02:35:25 -0400 Received: from sender-pp-092.zoho.com ([135.84.80.237]:25333 "EHLO sender-pp-092.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751463AbeGAGfW (ORCPT ); Sun, 1 Jul 2018 02:35:22 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; b=fVbwKyfytxdcVSjRkdAi1yC6jFdkgLicWrVmuinO5AkyOGs93PBOT296Xyw9a1tSaJI847crsjGP p5VnYoJto0sLBzYTGwLSKCEp8WT/Viy3kOYm5TIrHpf7yBsNy2VP Received: from YEHS1XR956R00D1.lenovo.com (111.197.253.128 [111.197.253.128]) by mx.zohomail.com with SMTPS id 1530425986938903.8361140701428; Sat, 30 Jun 2018 23:19:46 -0700 (PDT) From: Huaisheng Ye To: dan.j.williams@intel.com Cc: dave.jiang@intel.com, willy@infradead.org, ross.zwisler@linux.intel.com, vishal.l.verma@intel.com, jack@suse.com, chengnt@lenovo.com, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, Huaisheng Ye Subject: [PATCH 2/3] fs/ext2/inode: Fix a type cast error for fsdax Date: Sun, 1 Jul 2018 14:18:47 +0800 Message-Id: <20180701061848.7036-2-yehs2007@zoho.com> X-Mailer: git-send-email 2.17.0.windows.1 In-Reply-To: <20180701061848.7036-1-yehs2007@zoho.com> References: <20180701061848.7036-1-yehs2007@zoho.com> X-ZohoMailClient: External Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huaisheng Ye 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 --- 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