Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2089137rwb; Sun, 14 Aug 2022 21:07:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR4cUBk62O+mYjGe65rN0wxeIv3sedtEKkjzCsGoIc+qTTRw7GQMXlZQ3h+hRmIO0rmny1TQ X-Received: by 2002:a17:907:a063:b0:730:750b:bb62 with SMTP id ia3-20020a170907a06300b00730750bbb62mr9283811ejc.612.1660536437501; Sun, 14 Aug 2022 21:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660536437; cv=none; d=google.com; s=arc-20160816; b=o+0aw+0PCua7GC37I88z2c3APIXyAA6jt5MvkWzHaYOdaRqJd9tjYbK77DyZke9a9l z7gcr7pIBvNfArJTNvJs7P1UeA5Wc3dxk+3jWySufPzPotnPD6/zFnkCKY7bl53TEnBU 6t+ayi6c1/ylr1XJSyKoDuQfjUBnUBGu+bsx200HK7a+sMRlhJIcBHh9nrUkmC2XAd+v N4GhY65z1CN0MqVOFfkzdw/INSyYq2hqNqyB0fEqbZhc0BJQEshoOQDGv/95Edi+YR9u um/DqFxFGYhoGLa19H5Hb72kUYxTAsvmg2gXLbHP1cbwJlq7qtJXMBBBPMhheWcwrLYf TOVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=si+yP/cAPX61+BKFdf43zy7PI169kxeZSBXYu+A0pes=; b=X43lwPxt5fCIjUfqbiqV4mHlTyTXTI/4ZcLSHF5ChAAIM8ajrUIspPz/Snm0aqjBwx 0xxkGr6OBhMRzUD4wOnk8zl4Bpkyfhca/re6BJ3CbBB4y2gT7ZQrD7Hw8yA0dAtaD/WW Nwej6fny+1U965K9WJ7BYMLAaASfVmaKtSo0tF6EX32g+7Pb6TCB4niyC4sa9H+QPnCU elz7sprKrzO2VPU8JJjANDwf4DjGZUUTHiEW5PgER9tnoC0NNCd9xCLU/EmWpYMCQtuC 7XfTGUIioNdyvLCSAVdjg70qgotZ6vsttyKZOSc4idQJE2b/OUPZ56nMf9CSBpgabaFS 3hYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cGj6y/eJ"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020aa7d443000000b0043ccb3f244dsi6260085edr.426.2022.08.14.21.06.43; Sun, 14 Aug 2022 21:07:17 -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=@kernel.org header.s=k20201202 header.b="cGj6y/eJ"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229844AbiHODwi (ORCPT + 99 others); Sun, 14 Aug 2022 23:52:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229528AbiHODwg (ORCPT ); Sun, 14 Aug 2022 23:52:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0AB913F47 for ; Sun, 14 Aug 2022 20:52:34 -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 815C3B80CF1 for ; Mon, 15 Aug 2022 03:52:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32E67C433D6; Mon, 15 Aug 2022 03:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660535552; bh=x8mswgoGqL/z1c3stv7WymTX1bkbDAeAwck9N1MfYS0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=cGj6y/eJLhf7nsTgC7aSqktLSsEdswIC18PEZUrpeELK4uChjmCRTernzEtYJfczD zcHGxIqyIOG2DR6+Q+z0gLM6QVMw0rUr8u88f6eHt4wdD8G9cpojJ78ij2/FJs1bDG 42xq8vbVpILU76o+m/NyGbp/WSuj/u5AiM36GFh5ucLLqsvycpPnx0DJKtlyp/OgDA OjiczQKGG/PHQO6VI2SW8AZxe90myMJSW8YJBvZRqfspOog0IFKC2gqJxaEfNMdYnN /I1YHBOecfiDbZ1qktoNtAvZiirc4Z05vXkDlGYL5TrOxwxgNuhfZH0j0vCPhvQmTh KK4lfYKUt1pfw== Message-ID: <65562b32-505f-796e-305a-d1b03baeb388@kernel.org> Date: Mon, 15 Aug 2022 11:52:28 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [f2fs-dev] [PATCH] f2fs: fix wrong continue condition in GC Content-Language: en-US To: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: stable@kernel.org References: <20220813143709.11909-1-jaegeuk@kernel.org> From: Chao Yu In-Reply-To: <20220813143709.11909-1-jaegeuk@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 On 2022/8/13 22:37, Jaegeuk Kim wrote: > We should decrease the frozen counter. > > Cc: stable@kernel.org > Fixes: 325163e9892b ("f2fs: add gc_urgent_high_remaining sysfs node") > Signed-off-by: Jaegeuk Kim > --- > fs/f2fs/gc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c > index 6da21d405ce1..7e4b41240d59 100644 > --- a/fs/f2fs/gc.c > +++ b/fs/f2fs/gc.c > @@ -102,7 +102,7 @@ static int gc_thread_func(void *data) > sbi->gc_urgent_high_limited = false; > spin_unlock(&sbi->gc_urgent_high_lock); > sbi->gc_mode = GC_NORMAL; > - continue; > + goto next; > } > sbi->gc_urgent_high_remaining--; > } Why not: if (!sbi->gc_urgent_high_remaining) { sbi->gc_urgent_high_limited = false; spin_unlock(&sbi->gc_urgent_high_lock); sbi->gc_mode = GC_NORMAL; } else { sbi->gc_urgent_high_remaining--; } Thanks,