Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3530812imm; Mon, 2 Jul 2018 00:20:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK8dYUjyq5qnGNF0EVnCvRJFMfms+2ipJELm/ZtjukzC0qVaJAhUgIig1BBxYHVR8zZL8yw X-Received: by 2002:a65:5106:: with SMTP id f6-v6mr20423087pgq.72.1530516001273; Mon, 02 Jul 2018 00:20:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530516001; cv=none; d=google.com; s=arc-20160816; b=KjNBB8PaNVx9+Jw5Wk6Ou3eBk3vO1JzQbR3TRITa5xj2L2s6+rw7bxjpzZzPm3/JxU Bt6Gaj+syeFSNKyZI6vpK5Scpfy4FrizLrdmrPsKyhk9p3jubtRKUlpmkSB6GjV2cYUm onWANr9mBZy1zNYHIDPPwIEMFYBr1D/PlizOX/m3JOIDjqBSgpMOmvWGSpaY59ZsJtP8 Gys42/vetxiESCFQRhI2v8/5RU1O0tK4o5zt3JlKsimL+se5kxIcSIEPUBfm/q+kmXvM fJI+bq3ZJ9CS92Q6ONCnYj9V0f55tUEvdailBlKmYrucVgyoQJMIW2McYSRXqkTFJvQY ByGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-transfer-encoding :mime-version:subject:references:in-reply-to:message-id:cc:to :reply-to:from:date:domainkey-signature:arc-authentication-results; bh=Xp38JagD9PGmk89lJFIHNbaCiFCtGOr4MdrDHMoX3nE=; b=P9UFcennNLIj54b1Dlss55yX0wEUNWKALdhAcUKP7bWSetOJWkJRGQ8QIQ/t5CUNBb DiGBPEa831S2nF1PmCRBZuMrNOgwXX3+pTbT6jgz8XMIJ+9qXJ4OCr78ig70C1UTbQh9 un8EZNqgQhpYKz7yJtbWcFXloOLAB7yIzgJM4pN2o3Kvlq7bZv6J3B2mhZ4Rmo8pXRGV yTC0H/m1RaNx9zWOcEgKunoICjIApJ9JNCCxiBsDvxPGdPBuH60nfLZwAYPvQXbJDdw0 L/U7S79P0jaf061ELedvmdnXM5YUcmyCWTK4ahx3/jun7ad2lhS9reiPathjZsvVZDgL NBxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13-v6si8154796pgr.102.2018.07.02.00.19.46; Mon, 02 Jul 2018 00:20:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753363AbeGBGYi (ORCPT + 99 others); Mon, 2 Jul 2018 02:24:38 -0400 Received: from sender-pp-092.zoho.com ([135.84.80.237]:25307 "EHLO sender-pp-092.zoho.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753288AbeGBGYh (ORCPT ); Mon, 2 Jul 2018 02:24:37 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=date:from:reply-to:to:cc:message-id:in-reply-to:references:subject:mime-version:content-type:user-agent; b=pdG7D4setLlbcpm+n1LjzUs57WjM5f/OURfWcK/eLCVHzUkfPNrWX3MCIFbHIyJPyvT28zTlXpa0 wznWYXHkMpMI8Jh5aCUNL8hQjBpzDA7dsuGpiKZulYyz1ZmU6dA1 Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1530512622384862.6200589557761; Sun, 1 Jul 2018 23:23:42 -0700 (PDT) Received: from [111.205.43.250] by mail.zoho.com with HTTP;Sun, 1 Jul 2018 23:23:42 -0700 (PDT) Date: Mon, 02 Jul 2018 14:23:42 +0800 From: Huaisheng Ye Reply-To: yehs2007@zoho.com To: "\"Al Viro\"" Cc: , , , , , , , , , , "\"Huaisheng Ye\"" Message-ID: <16459a9432e.10c419704327.5268154349116077352@zoho.com> In-Reply-To: <20180701192600.GT30522@ZenIV.linux.org.uk> References: <20180701061848.7036-1-yehs2007@zoho.com> <20180701061848.7036-2-yehs2007@zoho.com> <20180701192600.GT30522@ZenIV.linux.org.uk> Subject: Re: [PATCH 2/3] fs/ext2/inode: Fix a type cast error for fsdax MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ---- On Mon, 02 Jul 2018 03:26:00 +0800 Al Viro wrote ---- > On Sun, Jul 01, 2018 at 02:18:47PM +0800, Huaisheng Ye wrote: > > 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. > > 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? Sorry for my inaccuracy. The type of iomap->offset is loff_t, is it better to cast first_block to loff_t, then do the left shift operation? > > > - iomap->offset = (u64)first_block << blkbits; > > + iomap->offset = (loff_t)first_block << blkbits; > --- Cheers, Huaisheng