From patchwork Sat Jan 9 07:58:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 12008021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26F68C4332E for ; Sat, 9 Jan 2021 08:01:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E08FC238E8 for ; Sat, 9 Jan 2021 08:01:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726822AbhAIIBG (ORCPT ); Sat, 9 Jan 2021 03:01:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:41208 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726742AbhAIIBF (ORCPT ); Sat, 9 Jan 2021 03:01:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 48D5023A79; Sat, 9 Jan 2021 07:59:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610179186; bh=HlkfW2Zd+8gbGgRYWpPKUKO7Wsu0D0Ym2jm7ngGDK6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TiFXWSyfmbsN3BDcG7PKa2lenBUufiTlI+s5eLmHeooUDodCaYvgbrC0t8ZxpN/zN JbsWlpl0uq3xkj5uqtZv+Bo4odDb3qTVPjpPtDmhmn5Wd7nmW3THFhIGqFy82BMiGx tp9i8kbwvNKQviYzrZG0WbLWcr5XJbqWSAXXjQI5TJr7DmZT9dJgYsscxWr94zZu1U 29llfMrMr/uxGRdZ2bUSuC0QnTZLXzMy4tbITGOnHX9r67IwEncVqVlvh887GdAWF9 1Joi3ciGc+t2Xqd3h4Ez1iZELXUZYaXEfHjEQS13fBBYIrW/L91+G0qYr3wVEK2oYu c0nd4I5Kgqq7A== From: Eric Biggers To: linux-fsdevel@vger.kernel.org Cc: linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Theodore Ts'o , Christoph Hellwig Subject: [PATCH v2 08/12] fs: drop redundant check from __writeback_single_inode() Date: Fri, 8 Jan 2021 23:58:59 -0800 Message-Id: <20210109075903.208222-9-ebiggers@kernel.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210109075903.208222-1-ebiggers@kernel.org> References: <20210109075903.208222-1-ebiggers@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org 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 Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara --- 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);