Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp4484387pxb; Wed, 20 Apr 2022 04:19:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9Fg26JbSeKJ+NTt9ujCHQ9wUsxGwBOVfF5MktvVMG5edGVs+ZGiMr1zd/KLj5q8nTZPGM X-Received: by 2002:a17:902:9005:b0:158:e46e:688c with SMTP id a5-20020a170902900500b00158e46e688cmr19689269plp.173.1650453572167; Wed, 20 Apr 2022 04:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650453572; cv=none; d=google.com; s=arc-20160816; b=ef59j1iJlubc9jhTNlS2G0NEOrTR5moMskIu3LifrsiHweQNOwBVGHcSTO/WjWb+xo uqGBcF4L5avjLBaw7eLQFm+WBb97XHeb/WJNLay0zSiP9vH2n6fZbFVg3vPXXL2/3di2 0S7hV6nVBLsf1ENt2Wf/ftAxy0cYo9jNtmcIu2/NdQN6A22SYrlGHOHmJoq5V/qL+bVJ arrCdKnmngvQGVZ7WNrU/XoJphxu3aqZL4lUMUcZmC1LScW2YdJacy9G25MB8cJVBo+D HdX1nM8+GVg3w5J0Skm0+dv9GiatjwGCZBROvVvS4UNlZhc50Wt0raqZlgYJOmA731pz WOgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q11U1aHNEmoFQU67G0jYjBzmgAyVyWNOFIWZCl0GHI4=; b=P94KorM5w0Tp3ejaYjAybArp4zKdmE8w6dYuoyKeZ/AYozjcShiZoJgr5N/I46F75U wwke3m7T4NAyQb885//trPXzbr/pkcyebS+3GnWGSEv9FMm8oeFNUa6D7DcC7ROOrVH4 dDKED2toC6yCrnrJWy2lW7pGOU9bPqfbRgh3FflZ0D6Ed//e3UeJ/5GNg9bQXQLSVFFx K/vPDd1nXzgMkUHHj8p+7lIlxuFkIO1/388d3KyUjD4+GvXNXxen/bQhD/L0WblmVsfo Q2CO99ZtNk4pAFvIxe5PPayK6APJmZffdgPs6tr4xSsRK/cXy5LYw20+kAAy6+iZxsd9 mxtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2PHbT08x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020a17090a468e00b001c7bfb058absi1815306pjf.99.2022.04.20.04.19.17; Wed, 20 Apr 2022 04:19:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2PHbT08x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238201AbiDRMSj (ORCPT + 99 others); Mon, 18 Apr 2022 08:18:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238110AbiDRMSL (ORCPT ); Mon, 18 Apr 2022 08:18:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C7711AD8F; Mon, 18 Apr 2022 05:15:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3FEDAB80EC1; Mon, 18 Apr 2022 12:15:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15DFDC385A7; Mon, 18 Apr 2022 12:15:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650284129; bh=oZO3stjKYcljS7kV1OFx+BRQu6rlTDBzubSb1E/srEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2PHbT08xm8EFuzvJHWiwJ9AOnQkpdnGMsvuWQPp8bLhaPAJGqk/9SkNKp9bpOYild A0HNnY38EOzVT1ouuKh0A1GvUu8kRR6OYjFCletRXcpp8xvnomWNV+k1modqWG9anq w6ztEFynv+bd9soua5Pcao3SZXVvEZIi3RN094/I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Thumshirn , Filipe Manana , David Sterba , Nathan Chancellor Subject: [PATCH 5.17 008/219] btrfs: remove no longer used counter when reading data page Date: Mon, 18 Apr 2022 14:09:37 +0200 Message-Id: <20220418121203.710096473@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121203.462784814@linuxfoundation.org> References: <20220418121203.462784814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Filipe Manana commit ad3fc7946b1829213bbdbb2b9ad0d124b31ae4a7 upstream. After commit 92082d40976ed0 ("btrfs: integrate page status update for data read path into begin/end_page_read"), the 'nr' counter at btrfs_do_readpage() is no longer used, we increment it but we never read from it. So just remove it. Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba Cc: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/extent_io.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -3562,7 +3562,6 @@ int btrfs_do_readpage(struct page *page, u64 cur_end; struct extent_map *em; int ret = 0; - int nr = 0; size_t pg_offset = 0; size_t iosize; size_t blocksize = inode->i_sb->s_blocksize; @@ -3720,9 +3719,7 @@ int btrfs_do_readpage(struct page *page, end_bio_extent_readpage, 0, this_bio_flag, force_bio_submit); - if (!ret) { - nr++; - } else { + if (ret) { unlock_extent(tree, cur, cur + iosize - 1); end_page_read(page, false, cur, iosize); goto out;