From nobody Sun Apr 5 13:20:06 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78B58ECAAD3 for ; Fri, 16 Sep 2022 03:21:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229741AbiIPDVM (ORCPT ); Thu, 15 Sep 2022 23:21:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiIPDVJ (ORCPT ); Thu, 15 Sep 2022 23:21:09 -0400 X-Greylist: delayed 362 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 15 Sep 2022 20:21:06 PDT Received: from cmccmta3.chinamobile.com (cmccmta3.chinamobile.com [221.176.66.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E00181B24; Thu, 15 Sep 2022 20:21:04 -0700 (PDT) X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from spf.mail.chinamobile.com (unknown[172.16.121.1]) by rmmx-syy-dmz-app10-12010 (RichMail) with SMTP id 2eea6323e97f584-61dad; Fri, 16 Sep 2022 11:12:00 +0800 (CST) X-RM-TRANSID: 2eea6323e97f584-61dad X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[223.108.79.97]) by rmsmtp-syy-appsvr01-12001 (RichMail) with SMTP id 2ee16323e9764d3-ab849; Fri, 16 Sep 2022 11:12:00 +0800 (CST) X-RM-TRANSID: 2ee16323e9764d3-ab849 From: liujing To: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, liujing Subject: [PATCH] btrfs: fixed an incorrect variable assignment Date: Thu, 15 Sep 2022 23:11:49 -0400 Message-Id: <20220916031149.6140-1-liujing@cmss.chinamobile.com> X-Mailer: git-send-email 2.18.2 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" In the btrfs_reclaim_bgs_work function,=20 there is an assignment of int ret =3D0,=20 but this assignment is not used in the following code,=20 so it can be defined as int ret. Signed-off-by: liujing --- fs/btrfs/block-group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c index c52b6e245b9a..a4c7fb423244 100644 --- a/fs/btrfs/block-group.c +++ b/fs/btrfs/block-group.c @@ -1571,7 +1571,7 @@ void btrfs_reclaim_bgs_work(struct work_struct *work) list_sort(NULL, &fs_info->reclaim_bgs, reclaim_bgs_cmp); while (!list_empty(&fs_info->reclaim_bgs)) { u64 zone_unusable; - int ret =3D 0; + int ret; =20 bg =3D list_first_entry(&fs_info->reclaim_bgs, struct btrfs_block_group, --=20 2.18.2