Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp672163pxb; Tue, 5 Apr 2022 18:10:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkPURfLQgDaPhj5lFGh3PDhlV361Pwjj4K4FEU1Yv3Ze5QpAd4FeY8oyCBmB1LFviQCAak X-Received: by 2002:a17:907:9485:b0:6db:331:591e with SMTP id dm5-20020a170907948500b006db0331591emr5969026ejc.478.1649207428219; Tue, 05 Apr 2022 18:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649207428; cv=none; d=google.com; s=arc-20160816; b=LQ6aCMJVzzIHZCHxnvLUVCT+2GjJQk4bZaVvspXEpcUq+5kbB4BJ0DHjYPyq5NDkvR 9qKgrvuLJpcBvMr1ScCrd+SUQnRzOE89ye1+EGXvbYLYDGtyDX5XmDeDgiqaVwWt0XTw YLJA+xJ4lLz9Jc9EAHIl6MSua2t9iWDsZoffTmM4zqvxfYIiXrmkARTD5SsP5hp4MaTb 0mTS0E8OwZW2rAjUc5FeiFjtO7KpI28fKzto+ibxjDBGlSm80Yvx5K6dnlQBVlEFgWW3 NAEjxQjVQJLE6cr1zmLl0yiterWNRZ+rUn7llvnivjMhqbqcXmMTBhqQlij9fY2+RoIf Yumw== 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=/zhMXyAS3SPrdkgLfE/1J8ctr09r9N+ElcEHymzidpw=; b=GITbSdCvg1PZK3edcZ/LbvRKqqCOynTYptlP4N6tCVAfp4sKtnniBE+R9oaakR+m1O 0E86+kOOJJhzYm37WebrSvdyt69E9fL3H1gOsCfQBxhY1If5WOIRruOpplstbrpNAve4 Q/xR9vYgiySfX9U6Czx16H3mxqYW4RH68fQcWeHjaMlS8dFhdML0tpLm2eP4sTlphfwZ K5wbupcHaeO4cF8d0KjbIoVOjtfkhAxVxe+Hry6JakJN013RBBr/QEW404Zfk5Ewy9aT QbyFPKfCClrLmwovoToGE4sS71r5UL44/PpAkOo6nXP5ArQ9WibniS/aRE79H2w8JlbN lsXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=w1DTVntS; 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 c10-20020a170906528a00b006e7f6044164si5246065ejm.672.2022.04.05.18.10.02; Tue, 05 Apr 2022 18:10:28 -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=w1DTVntS; 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 S233998AbiDEILl (ORCPT + 99 others); Tue, 5 Apr 2022 04:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233337AbiDEH5E (ORCPT ); Tue, 5 Apr 2022 03:57:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A36184504C; Tue, 5 Apr 2022 00:50: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 ams.source.kernel.org (Postfix) with ESMTPS id 0BBECB81BAF; Tue, 5 Apr 2022 07:50:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6CFFEC340EE; Tue, 5 Apr 2022 07:50:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145052; bh=S9cmyvSafNm0XeTi5sEgSrscdGdc2H02qmOF7tU8Kz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w1DTVntSHDMojccmFFdqNBm5oLaIiI/AzVIg2MAeuWPPjoRG7GdytWnmHD4HCFIb7 pYx32UfdQNbKQMJphHXp8EHDqkLsWnjNUbjRQB3W3HK7hZT9/CwrVbZIEInRMkqIgi iVj0q/zd3KL52gYINaDINFVPI4I1gZ95LAIXDhYU= 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.17 0268/1126] f2fs: fix to enable ATGC correctly via gc_idle sysfs interface Date: Tue, 5 Apr 2022 09:16:55 +0200 Message-Id: <20220405070415.477113051@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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.1 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: 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 8ac506671245..bdb1b5c05be2 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sysfs.c @@ -481,7 +481,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