From patchwork Wed Oct 19 08:23:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4616 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp211872wrs; Wed, 19 Oct 2022 02:06:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7/EuHStdC8TbP2KoVw5LV/1GYx5A5OUtDyosWeo+wXp5dskrIrjFXR/jQ7oZ2kZbfGXeHV X-Received: by 2002:a17:906:5dac:b0:791:93de:c61d with SMTP id n12-20020a1709065dac00b0079193dec61dmr5712069ejv.751.1666170366824; Wed, 19 Oct 2022 02:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170366; cv=none; d=google.com; s=arc-20160816; b=KV+k9E5ZDBFSLn8ER/3nzkOAo7DJj40dBbxkG+dOghZHeRqZeE7RXO8SLcxTPOcb+x uU5ic2FHeG5Mb+Ef6t/yTXC8JaLHGDFD9iod0DQqgx5omerZnmyuoJY0Aa2S4hRCjzQY Tgg6D6/R0Pr8rsjoM+7TNflq6+Q+zSllEhSRH8eJelPtxNjm42q5GXx88Uwcc9DR7/gQ rf077TlrtAtA3J/7T3MJWeRL5yWLEFdY5hXqhITqgLADHnanXjkU2c83RsIZV4dZZ6kQ Vpr/13bM3css8Dyx5smxufbApuGsrk9kTMdUHFQcvfOAB9kZtHWT69QUuo0tWn49Qp0w Ee0A== 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=DX3U+c259M7FwvA56ZM842lsr9RQWobeOcEvJ6E9bFc=; b=Jbku4QVfZnAMZiewrXzFysshxPTZa9aFOL/zUlqwiTHPSeKHdBT+eZPY4aPL0ZStDx pYBE4ctEwPVRTdtfJg91q+jc9dpFK/+MDSKQrFIrXxle7VQsFd/SYx371ae18802A/Dh dPoJ4niWf6vL9IkJIe0wvE9lHMxGvcPjrXJAyXuFYcWbb2mpVSU4iNWv+mmLpnxtf3zd OcPWF4mSqEHsBrPnr5vvwtJURY08dD2SVsvb0icFYN85JYzpOe4OG0Z0CtWyqtrIZTmc KU540nxF3ng4RfRy/Ba06Zk/240w93MYOT/vke/XVC2a2FmPhn2VMVGAc9TFu+z5oGCZ wdhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tPqm4QmF; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s16-20020a50d490000000b0045cd50b7c65si12187301edi.266.2022.10.19.02.05.32; Wed, 19 Oct 2022 02:06:06 -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=tPqm4QmF; 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 S231747AbiJSIzU (ORCPT + 99 others); Wed, 19 Oct 2022 04:55:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231785AbiJSIxl (ORCPT ); Wed, 19 Oct 2022 04:53:41 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0D168F964; Wed, 19 Oct 2022 01:50:43 -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 35552B822F2; Wed, 19 Oct 2022 08:43:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 872ADC433D7; Wed, 19 Oct 2022 08:43:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666168992; bh=KzHqx2mfIHoyi1WiueYBo5GyvE9Q9Y8B+TZngBTNrwY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tPqm4QmFgftSlHRszVVDxZa+UNgOdHWCzzTSwXuZWecOEJtLN4Jdr1oVlCo6Ba9r5 mj02VB5cKBTX43uO6k2CYg7U3emUQVIrVpSUzTimoarcEtfQVA7+nyI0VRrX8rADxJ hOqFYI/o/HCsnd0PdEI+pC7orp4YcEhuOFcUFTEk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chao Yu , Jaegeuk Kim Subject: [PATCH 6.0 123/862] f2fs: fix wrong continue condition in GC Date: Wed, 19 Oct 2022 10:23:30 +0200 Message-Id: <20221019083255.387516069@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747106258222974996?= X-GMAIL-MSGID: =?utf-8?q?1747106258222974996?= From: Jaegeuk Kim commit 605b0a778aa2599aa902ae639b8e9937c74b869b upstream. We should decrease the frozen counter. Cc: stable@vger.kernel.org Fixes: 325163e9892b ("f2fs: add gc_urgent_high_remaining sysfs node") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Greg Kroah-Hartman --- fs/f2fs/gc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -97,14 +97,10 @@ static int gc_thread_func(void *data) */ if (sbi->gc_mode == GC_URGENT_HIGH) { spin_lock(&sbi->gc_urgent_high_lock); - if (sbi->gc_urgent_high_limited) { - if (!sbi->gc_urgent_high_remaining) { - sbi->gc_urgent_high_limited = false; - spin_unlock(&sbi->gc_urgent_high_lock); - sbi->gc_mode = GC_NORMAL; - continue; - } - sbi->gc_urgent_high_remaining--; + if (sbi->gc_urgent_high_limited && + !sbi->gc_urgent_high_remaining--) { + sbi->gc_urgent_high_limited = false; + sbi->gc_mode = GC_NORMAL; } spin_unlock(&sbi->gc_urgent_high_lock); }