Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2327993pxb; Mon, 11 Jan 2021 07:02:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLMdCdNByZ6IagdpvEgMCnMXxoU5bNeF+hVG/VFeisg/QSo4tF14liz2RM7xvuip+ZWj6b X-Received: by 2002:a17:906:c7d9:: with SMTP id dc25mr11412244ejb.138.1610377329117; Mon, 11 Jan 2021 07:02:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610377329; cv=none; d=google.com; s=arc-20160816; b=rLgB+moiLdRXD3bUn+y981YiHkGXuSBEPbDYTmq0pL0gyi3LT/NnOP8KkTbHOedLXt sBQKK5jIUIdoCSRoQUDB409+sDAUdhbFmPR3lTrP2R5J8zkYrW6OmWmMGOvXjV7crOuA mVwsbZ88vlUcX7GEuDe9neAuy7hhHSMcO8iNavTwZQID1HAyJgpYqj6dIYjyyC+nnmx6 tlrO0CVpojO34Hfk9nAl559J+iCqi2bRkkVbFWQEAGC2oG80ZmERvCi3lR+/UQMUYn6T szpWobE8eQmbgFzD5b3mas2lbNZffj2A/5HP3bFftkOGC5FITjpryKtYvUjUHNgA74hA fUhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=iey68WWVjyploGx2KyESkUwhn2c202bhiDX092f/qEk=; b=niVoUdzypGA+oOWH/hA4wNP5yiU7fbxPnVp8vH3TJzEULMUElBfq/BuTslG/WIqC/N /Ndr/dZlFDRxSEx3coQ711EraP+jiPQD6S1gGUtzFy0BKhONJyamrMRLOgA9meZfu1pC ijhOCxkKbeIltnCRw/aweh8hAhP4kwIspGq3/2CJ+rAuPJQUF+zfu5Xpw4b7xSTV2JCo n5gpZRhWQCnHKGoILTSSFUlR0oc5IW8BsS+I0FGpvME9GLcvNZFwyS/Fyxf3J1TbJgOs CVTmuT0ZXGVfWNyHtU6opbn6lufy26Ry1R3B01/d2Y4isEM0b4d6Im0GeeDlycR5SFuI BCcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb9si7054808ejb.655.2021.01.11.07.01.45; Mon, 11 Jan 2021 07:02:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732472AbhAKPAs (ORCPT + 99 others); Mon, 11 Jan 2021 10:00:48 -0500 Received: from mx2.suse.de ([195.135.220.15]:42622 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730300AbhAKPAq (ORCPT ); Mon, 11 Jan 2021 10:00:46 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 4E4B4AFA7; Mon, 11 Jan 2021 15:00:05 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 1B8AF1E0807; Mon, 11 Jan 2021 16:00:05 +0100 (CET) Date: Mon, 11 Jan 2021 16:00:05 +0100 From: Jan Kara To: Eric Biggers Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Theodore Ts'o , Christoph Hellwig Subject: Re: [PATCH v2 08/12] fs: drop redundant check from __writeback_single_inode() Message-ID: <20210111150005.GG18475@quack2.suse.cz> References: <20210109075903.208222-1-ebiggers@kernel.org> <20210109075903.208222-9-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210109075903.208222-9-ebiggers@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri 08-01-21 23:58:59, Eric Biggers wrote: > From: Eric Biggers > > wbc->for_sync implies wbc->sync_mode == WB_SYNC_ALL, so there's no need > to check for both. Just check for WB_SYNC_ALL. > > Signed-off-by: Eric Biggers Looks good to me. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/fs-writeback.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c > index 80ee9816d9df5..cee1df6e3bd43 100644 > --- a/fs/fs-writeback.c > +++ b/fs/fs-writeback.c > @@ -1479,7 +1479,7 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc) > * change I_DIRTY_TIME into I_DIRTY_SYNC. > */ > if ((inode->i_state & I_DIRTY_TIME) && > - (wbc->sync_mode == WB_SYNC_ALL || wbc->for_sync || > + (wbc->sync_mode == WB_SYNC_ALL || > time_after(jiffies, inode->dirtied_time_when + > dirtytime_expire_interval * HZ))) { > trace_writeback_lazytime(inode); > -- > 2.30.0 > -- Jan Kara SUSE Labs, CR