From patchwork Sun Jul 1 06:18:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huaisheng Ye X-Patchwork-Id: 10498515 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 725D660325 for ; Sun, 1 Jul 2018 06:19:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 607F328BCF for ; Sun, 1 Jul 2018 06:19:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5462F28BD3; Sun, 1 Jul 2018 06:19:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1CBB828BCF for ; Sun, 1 Jul 2018 06:19:56 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0496A20336AD7; Sat, 30 Jun 2018 23:19:56 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=135.84.80.237; helo=sender-pp-092.zoho.com; envelope-from=yehs2007@zoho.com; receiver=linux-nvdimm@lists.01.org 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) 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 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 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP 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) {