From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 04F7BC1975A for ; Wed, 25 Mar 2020 12:29:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE3ED2077D for ; Wed, 25 Mar 2020 12:29:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RVzkpjLx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE3ED2077D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZYoxHsMDiqvuDzVV2NQXFdmIf5kTds3rqzmsGB84g04=; b=RVzkpjLxnEgqcI 5ob44qhoVicspwrEfyQvQ+Z4sD6scmzL71al0hNVtngzokB7GwXfHtMAQKsc+3UmgZDrziYAFtcQX 19Bs+U7mq8D+it/lCC3dfnhuUcPOhu1wkCcozJCvYpXrgJNMonqYX6OMuOaEjVPD6lFhpus9kZ4Mw BTUhv9RgNCwjhEfPOOVFO+MGxYjBtQhGpJSg9d+9ukGFkTFZzTYFrscuJcy0f4BSRxSplUa7MDPGd x32eodcjuUT8h6S7ofIp79eNZ1jwixFndnf9uXbC2DdKAID/GR7PLnq8n6FBqe2KqlnxCMolRf5sA FhItAaUGHhGiGVrPZN8g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jH59i-00043D-Bg; Wed, 25 Mar 2020 12:29:10 +0000 Received: from [2001:4bb8:18c:2a9e:999c:283e:b14a:9189] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jH599-0003Ko-4c; Wed, 25 Mar 2020 12:28:35 +0000 From: Christoph Hellwig To: "Theodore Ts'o" , Jaegeuk Kim , Chao Yu , Al Viro , Richard Weinberger , linux-xfs@vger.kernel.org Subject: [PATCH 3/4] fs: don't call ->dirty_inode for lazytime timestamp updates Date: Wed, 25 Mar 2020 13:28:24 +0100 Message-Id: <20200325122825.1086872-4-hch@lst.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200325122825.1086872-1-hch@lst.de> References: <20200325122825.1086872-1-hch@lst.de> MIME-Version: 1.0 X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Eric Biggers , linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org There is no need to call into ->dirty_inode for lazytime timestamp updates that use the I_DIRTY_TIME flag, as file systems per definition must ignore them. Signed-off-by: Christoph Hellwig --- fs/ext4/inode.c | 8 +------- fs/f2fs/super.c | 3 --- fs/fs-writeback.c | 8 +++----- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index fa0ff78dc033..dbdcf3cc0e64 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -5805,17 +5805,11 @@ void ext4_dirty_inode(struct inode *inode, int flags) { handle_t *handle; - if (flags == I_DIRTY_TIME) - return; handle = ext4_journal_start(inode, EXT4_HT_INODE, 2); if (IS_ERR(handle)) - goto out; - + return; ext4_mark_inode_dirty(handle, inode); - ext4_journal_stop(handle); -out: - return; } int ext4_change_inode_journal_flag(struct inode *inode, int val) diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 529334573944..5f3221ade64e 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -1091,9 +1091,6 @@ static void f2fs_dirty_inode(struct inode *inode, int flags) inode->i_ino == F2FS_META_INO(sbi)) return; - if (flags == I_DIRTY_TIME) - return; - if (is_inode_flag_set(inode, FI_AUTO_RECOVER)) clear_inode_flag(inode, FI_AUTO_RECOVER); diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index dc2d65c765ae..482781da8be1 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -2252,16 +2252,14 @@ void __mark_inode_dirty(struct inode *inode, int flags) * Don't do this for I_DIRTY_PAGES - that doesn't actually * dirty the inode itself */ - if (flags & (I_DIRTY_INODE | I_DIRTY_TIME)) { + if (flags & I_DIRTY_INODE) { trace_writeback_dirty_inode_start(inode, flags); - if (sb->s_op->dirty_inode) sb->s_op->dirty_inode(inode, flags); - trace_writeback_dirty_inode(inode, flags); - } - if (flags & I_DIRTY_INODE) + flags &= ~I_DIRTY_TIME; + } dirtytime = flags & I_DIRTY_TIME; /* -- 2.25.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/