Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp806529rdb; Fri, 2 Feb 2024 04:52:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvQQ2zViHLQ0Yf/B0/JNlqZm37xszLTcIHn4QbaY+sRvgGh3gzczowKvL5IgvutpjvECug X-Received: by 2002:a17:907:2d12:b0:a35:695e:4507 with SMTP id gs18-20020a1709072d1200b00a35695e4507mr1661302ejc.41.1706878322413; Fri, 02 Feb 2024 04:52:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706878322; cv=pass; d=google.com; s=arc-20160816; b=oQOq5XwD06efq74iXdaDAQ3+3Pfu9ATSDXm4MdAuo5L5Hg3J3gCnO0FdECPJk5+oY0 J9EmhOaJO1HDzdpY2wgouq7kKddXjNhSEWk4knnjAyZKpB6q+6q5+pr9t0mWIrdok7Vy QFaMBRbshC0IXH5WOeU2SEqeN5iBmc8oHeD67yPi8GHegGmIWcQgiVz5lIKQuYMLLpri 7O3tuCvFYoY6/iUJx2fiOob4ZwwaltN+Kxuf/0e5sxx+Bd1cfXSaQMeDIkjQJovGFh49 KFJsoe7UT1dtygV0waxadWT6qnXijZAoFWNbpi81A84IiftVMxY6ob2PSCrpfajV/Gl7 fWiw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=G3ynj8pSWYwSq2HvXXTNmEdS2v7jy7hp2Y70uOdGCXQ=; fh=Fw7yktmDDWcP3pgRDbMD+N2MwhekMchIdX647mz+ucE=; b=iUt1qG2LDjfDg/gAXNrx9+bRx0mGN3+InngC/u/tbdUA0pJIiN+U6ePxFmAiSzfsDL fHplUVSZhBOmJ+1y6w29HMlaAG5c5rQBOh+I1+OCagFphMVLKOx90B50z9Ji1zlJbWuu a1s8fykeeBf5aFyJE1OOKzKel00p/8b/kCr3FXssSZcqiLJMdwDYSBHe/I+Uba8ACjKU 2lf35APjwcQQ5y4yiqsMl4YXVQn6fJgI6QuhbfwxBdOT9hGatftg4tFQYIRhoRfSSv86 Ip13qJPb0yndh/qCApjFJt2QdhqsnwHBxsIzyqj2ZZoUNYa20SACTNl/c2tP5kJKq0l4 DARA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jgCPUre4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-49865-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49865-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCXzflR52O7WSJKaW8tlduWEj/QjfCqgpQ7y/jD3rQvt+JNP/GrLwhDL2V16QfX6/7lfoOYMrOPx0MBJbGX2TNo+4ySaBvhozGAOx7Pnog== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gz7-20020a170906f2c700b00a37015e604csi596269ejb.960.2024.02.02.04.52.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 04:52:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-49865-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jgCPUre4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-49865-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-49865-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C899D1F22997 for ; Fri, 2 Feb 2024 12:51:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5510E182CA; Fri, 2 Feb 2024 12:51:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jgCPUre4" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7AA5B46A1; Fri, 2 Feb 2024 12:51:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706878267; cv=none; b=vBMwd+4J7ud77E9uPmGp2uGB/btHRNCpHwb5qVUisd3gW2QKU6m48l4ro3gakI29MKOyXsBogy18TV+qg9Op7vpF4Y2VmyXVLdU3KmldNXaUBlonIl4FFkg9VqzeKSRYf3f5ZRpLlDU6qp6apnB86ELOGmxIFtI/wBxFHZBm8Y0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706878267; c=relaxed/simple; bh=bohs+MfRQtoEvlbrdoNXCxU86/PjKr+jUrCw8c/Vbak=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=f71cPalTzj17nAwPHOCFsPxfOF4NEHb3Qa4fzG/zofhnWm9+oVWHi1UkamZNa8bTigA2GXZRiz4NAe7Utv6aaxDe0VrUDZZt3FtdQtQGTIRLSvmnNhpwnVqqDKmMljVYa0uqaeDRFRxYiBKEV0whHgDboXpcT7GyLzxnzaByt5A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jgCPUre4; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B5DCC43390; Fri, 2 Feb 2024 12:51:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706878266; bh=bohs+MfRQtoEvlbrdoNXCxU86/PjKr+jUrCw8c/Vbak=; h=From:To:Cc:Subject:Date:From; b=jgCPUre4x8M4zBJWCaJb4zOgOhqI0TLLjGDrWbZBmG+RHHh5dkzO7D8EpwaWU0jcv sQ3qIa/mLGTPGceZucN8231CoKtoPMgnggFHnxgYAQWYNJ3xEC9hSlHgy669XbaotB a66B3kI9Sdes77idWssZiYHA1+Q2WnXBkp6Yfy2opQaCyh4sQMd/lL7GCpc5i98V7j Y5/hFCDrdA0U5th+9eDblPZv9eJsSFibGRhG2EGD8lO4FBIZl9lSiyrpt2Y0deBIXI g0mso1YO0bfAK1GLd7F3IIRA/BNetGiSrXCpWFqLj948v3vPfpYHCBUrmxASYzaOHn KnHZqrng12pNw== From: Arnd Bergmann To: Konstantin Komarov Cc: Arnd Bergmann , Christian Brauner , Jeff Layton , Jia-Ju Bai , Edward Lo , Abdun Nihaal , ntfs3@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] ntfs3: avoid an unused variable warning Date: Fri, 2 Feb 2024 13:50:56 +0100 Message-Id: <20240202125101.986302-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann A newly introduced variable is only referenced in an #ifdef: fs/ntfs3/frecord.c: In function 'ni_read_frame': fs/ntfs3/frecord.c:2460:16: error: unused variable 'i_size' [-Werror=unused-variable] Move it into the same conditional block. Fixes: 4fd6c08a16d7 ("fs/ntfs3: Use i_size_read and i_size_write") Signed-off-by: Arnd Bergmann --- fs/ntfs3/frecord.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index 3b42938a9d3b..7f27382e0ce2 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -2457,7 +2457,6 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages, struct ATTR_LIST_ENTRY *le = NULL; struct runs_tree *run = &ni->file.run; u64 valid_size = ni->i_valid; - loff_t i_size = i_size_read(&ni->vfs_inode); u64 vbo_disk; size_t unc_size; u32 frame_size, i, npages_disk, ondisk_size; @@ -2509,6 +2508,7 @@ int ni_read_frame(struct ntfs_inode *ni, u64 frame_vbo, struct page **pages, err = -EOPNOTSUPP; goto out1; #else + loff_t i_size = i_size_read(&ni->vfs_inode); u32 frame_bits = ni_ext_compress_bits(ni); u64 frame64 = frame_vbo >> frame_bits; u64 frames, vbo_data; -- 2.39.2