Received: by 2002:a19:651b:0:0:0:0:0 with SMTP id z27csp3753886lfb; Mon, 9 May 2022 03:23:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwghChfEtoBncDIbRWtK0a/J8k7Qcd4PpEUnhqAeC6eZaplx+WIwkKPOlTRfd91cjjSjPtU X-Received: by 2002:a63:4cc:0:b0:3c2:2450:7d79 with SMTP id 195-20020a6304cc000000b003c224507d79mr12383218pge.502.1652091814521; Mon, 09 May 2022 03:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652091814; cv=none; d=google.com; s=arc-20160816; b=knmyFO7/WPSB10SreEU+nOaDauO05xH35upoUJ2ku1n76iBt7bx407nWwpd1NHWUuO wylnHz3lvsiKvqWdP1GqPVmUag3RG2yRN14BRDT9quZN4V9fUj9e8RmP/2crjHp8mAmA RYTvbn1IM3AxZqFvBymK2brTRQToljUmRVTviP4pgzbyjbiLRPExr/QCQ5r+L2XbTwUa 69uGohzLYuVqtADOsOBA+t5B2cm/rh/hT5glMM/5JXMtKhgf3nNjv8AprKZTmMdMqUGt 2lk1YSMOVY9nIoBAC+xvNiQSTnlF/2x/11hsRMow6/iT2z8v5dWkWMF7qmpBIh2rPIdA 5mNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NXqU/aWXlEJRQ0qJPG0UDAA6ajCwUtVVCzntAHnRaiA=; b=jaOaBlSWzl8k5/N1MNqnBQoMUqqj89273OQBJp3uXH/i8X7dm+wbOTEr3c2o4Ixpyk ftLZWkWAPBisn/8gd7cNE+jMjveZl3kgOyPRF39iTsOcVCjyxtIaMCDeKfSBhqwfUoJb aynBagUnJVVVE6RinJzr5AEdI3OaRsZtSPiceMbEqAFXjo0/DmuGTsfSJPQhqur8PC08 kdirEISQu5fBeEf6PUkqtfOWvwdeialy1Wd/gJ7a3psXdmYjV8xp+ozUKKF8YDGXYzJy b0njPmi4jtAF0KCQhSA/mmRKHeJMvCvHGaQ/2irOtOIHNMfHbTZHcdwd4JzFaqZ0fXJL v89Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=A8UyI3dy; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x14-20020a170902ec8e00b0015e93c5d222si12575927plg.186.2022.05.09.03.23.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 03:23:34 -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=@infradead.org header.s=bombadil.20210309 header.b=A8UyI3dy; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C83641FD1D8; Mon, 9 May 2022 02:59:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235621AbiEIHF5 (ORCPT + 99 others); Mon, 9 May 2022 03:05:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235533AbiEIGuz (ORCPT ); Mon, 9 May 2022 02:50:55 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DAAA15352F; Sun, 8 May 2022 23:47:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NXqU/aWXlEJRQ0qJPG0UDAA6ajCwUtVVCzntAHnRaiA=; b=A8UyI3dyR0UMChql8GiSRtDrdG NhJfAe8bZH5q0+JtAhELL8B6mM1KMBMh03KRjiYG5iWh35ecaxA6qSZP3pTY6niEKlwyBnya+MRXu OUcmmFXOWKfCfS5i5npygLP/dSdE18dckI+xdIpn3rTI/IYtG26eLZDQV83aXUe75HcLkeDy0UVTj J6OfGdbhAtTdw9BhztJGloZTOnWLDblt/Sflv6pSpQyHZhHsiAjq22JQnfVXrj7V/KV3WDFZGeGEN YkVyvD5JYbkNfqoVw+2qJcYI6KWi9izviBWZG2wlla30ZffNX9zqiIqSurWHjxvL6BuZ5PFkyFsrq 7ImMYZqw==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnxAQ-00CkUE-D3; Mon, 09 May 2022 06:46:50 +0000 Date: Sun, 8 May 2022 23:46:50 -0700 From: Christoph Hellwig To: Jing Xia Cc: viro@zeniv.linux.org.uk, jack@suse.cz, jing.xia.mail@gmail.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] writeback: Avoid skipping inode writeback Message-ID: References: <20220505134731.5295-1-jing.xia@unisoc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220505134731.5295-1-jing.xia@unisoc.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,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 On Thu, May 05, 2022 at 09:47:31PM +0800, Jing Xia wrote: > if (!(inode->i_state & I_DIRTY_ALL)) > inode_cgwb_move_to_attached(inode, wb); > + else if (!(inode->i_state & I_SYNC_QUEUED) && (inode->i_state & I_DIRTY)) Please turn this into else if ((inode->i_state & I_DIRTY) && !(inode->i_state & I_SYNC_QUEUED)) to keep it a little more readable. Otherwise looks good: Reviewed-by: Christoph Hellwig