Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp636992pxb; Tue, 5 Apr 2022 16:49:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxX0x9qLjJyMkJhbh4Jmu+z4NE85IB+VLnb/MbWhMz26ukRb+NFxpnVmITGu0ye4qBrHRg9 X-Received: by 2002:a05:6a02:182:b0:374:5a57:cbf9 with SMTP id bj2-20020a056a02018200b003745a57cbf9mr4790107pgb.616.1649202598539; Tue, 05 Apr 2022 16:49:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649202598; cv=none; d=google.com; s=arc-20160816; b=Ct0GXBBuypz/9CWRM3rlWwjGz6MnDROOGNwwuzlG7QuC+epTCcvEqovPJVUpNbeOca D+7DFWlg/aMlsL7mHQdV9gPecnvWYYdQA0Cbs6JR5m6Vw0R55Sto5Tq/mMypMDlIBeJo bIf1Yr8GZ3jmPBOLslN/CSJGLNt0N1NCyPP8Of7rugQvmVDcQNVjry3g09sqCbg42rg6 iUsmpN1BfCU+jYmK9YhqB64EwdmU1V8exZgwafxqj+0i53mn69a4GlJkL+gy+s4rTKDW hRhQIvmrJWxx1rx6tfIiBul3TCSegtRB7K6ONsed6/bZYs51WDNRVCuJrRvlPYuzgpyn 2HoA== 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=P+eNR1I739a0ICutiyeFnt2NRSnckMk+ZzG8y6p07D0=; b=ReyU1EkzfBE7nFC6CMFFE0nTryqDyGHBbgovlNamcN6k+2dKDNrRibiS7mbTzkMDqL jktvHlDnW6S85merB1rxqLcZCcjbCs3OhxKBUbISwjzgMbn511r6a2mvGVnmZfos35Q8 EitAWX8q8nOZ4g7BJzZyILZFdi0zgdC0gNzgUEk0mSjZlOHHH6RDx65LcN5GcuAhhYW0 iql96fSFrZkWn8hsvZpwU4XbI8ss+pGUla/va2q8sm/HBB1DvckEgTTN1z6IQDz7Le8Q JE70rh5ndzqNnPK+f4UurW/7wkfy2MFnAE783My5siqyumj/r8Wg2xB551NKwT+eohXj YEcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nyMjK+HF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i17-20020a63e911000000b0039864440c1esi14486558pgh.786.2022.04.05.16.49.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:49:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nyMjK+HF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1C64C11BD9F; Tue, 5 Apr 2022 16:34:19 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356797AbiDEMKG (ORCPT + 99 others); Tue, 5 Apr 2022 08:10:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244728AbiDEIwf (ORCPT ); Tue, 5 Apr 2022 04:52:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 187C81B7BA; Tue, 5 Apr 2022 01:42:55 -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 dfw.source.kernel.org (Postfix) with ESMTPS id A8C7E6117A; Tue, 5 Apr 2022 08:42:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4A13C385A1; Tue, 5 Apr 2022 08:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148174; bh=kvRwxX1fsm4vbiE6yY9Es3GHrv9VeOjjjPwmJ2nrnFM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nyMjK+HF1wHdQzu6F8o4yjlEb1nN6H2/0TWBvynqXy5bodLHvmY4Z3jhQKDRA8BEB P7aaASsM6U5lhkO1KD24GxTe/opqk71JTxDGkDmhFzlDnbdQGssPViA5QfkbId74xn WiT5wWCVrouXauRbgJqdsUVnF8gbVvK8T8CeG9x4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhipeng Tan , Jicheng Shao , Chao Yu , Jaegeuk Kim , Sasha Levin Subject: [PATCH 5.16 0259/1017] f2fs: fix to enable ATGC correctly via gc_idle sysfs interface Date: Tue, 5 Apr 2022 09:19:32 +0200 Message-Id: <20220405070401.951544587@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: Chao Yu [ Upstream commit 7d19e3dab0002e527052b0aaf986e8c32e5537bf ] It needs to assign sbi->gc_mode with GC_IDLE_AT rather than GC_AT when user tries to enable ATGC via gc_idle sysfs interface, fix it. Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection") Cc: Zhipeng Tan Signed-off-by: Jicheng Shao Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- fs/f2fs/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index 8cdeac090f81..8885c7383472 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sysfs.c @@ -473,7 +473,7 @@ static ssize_t __sbi_store(struct f2fs_attr *a, } else if (t == GC_IDLE_AT) { if (!sbi->am.atgc_enabled) return -EINVAL; - sbi->gc_mode = GC_AT; + sbi->gc_mode = GC_IDLE_AT; } else { sbi->gc_mode = GC_NORMAL; } -- 2.34.1