Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29469154rwd; Wed, 5 Jul 2023 12:17:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlG5C+ZIIcO4KX72R8sbLGgbbBspnCpdBrVpc+z+RAs2bLPIb13EiOw1GUqZVwIsuxZy91zI X-Received: by 2002:a05:6e02:107:b0:346:f14:86ba with SMTP id t7-20020a056e02010700b003460f1486bamr96569ilm.2.1688584661749; Wed, 05 Jul 2023 12:17:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688584661; cv=none; d=google.com; s=arc-20160816; b=TV9l9/5tIRjczzEPPlDd9ybp2T5Mj9/7OCzfC+jbtMebq/6j2UOeE7o0J9E6l3blbu 5GFYQZHO9he/zavYaygtICn7JqOzug/kzOb8N3wDeLsC9C3vzBNQ7uuSOl4kM2TW+5MW M6+hhvM5nFMQ7Jj4bIfXW3Up3DKiM/1o+cQm7XBvJL3v9Gz95M/b6/lH9syAeIYxSo66 /zyXPiwpdFvE7vx+rbUb44Ot/YaamSO8JQkFTvZyfDplkHnLmsT5OcP8y+Hkj1b+KEDn kk74vroEQBvwlqZBRjrxt8yUem8+qyY9QG9pwfolUBW/RwVZRvI2amk3Doiyk9XZQJVA mQNw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=M5FW/F66bvyKFLpjw1TbrFQIWywvTTH+LBmWNl+PqeQ=; fh=hshfxaSiAdJ0QSS5OAKXCySBOTIA9NmCMCDMDlwHCkU=; b=v0ME8V6HJNHEJf90gzYRWYSx1W5MH55DZ/vzxhUTfBd5715j4Hg2BmwcsyLiQBySLE Eu4/B82IF1QjcjCd8JVP6Ay5SLlRHn/ZtKguyyzkFvYNktjNs68NaszAaePj13OUBkQv bEXY9a5pEUtz/T9aqOFjnnlhKMKKtgNv+dTvTpkN11rSR6x+Wwk3wYxA12WM6AQP40// 1g5AgXYt6/RoGE3FrU7XrvHTiijuWL9A+Xl4poycLiRvAJUTuekRtyvqfh4lT9Pd9KVc DJg6wb07q57PM98bCVnIIpPHzC04/k/rKJNpwF3VYhrMY9FDilWtt6CXIfrUXj8XdvVI MpyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q5YkT3oK; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n128-20020a634086000000b00553b783ad97si24009826pga.228.2023.07.05.12.17.18; Wed, 05 Jul 2023 12:17:41 -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=@kernel.org header.s=k20201202 header.b=q5YkT3oK; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233622AbjGETEA (ORCPT + 99 others); Wed, 5 Jul 2023 15:04:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233439AbjGETDb (ORCPT ); Wed, 5 Jul 2023 15:03:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91B3C1BCD; Wed, 5 Jul 2023 12:03:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2FE6E616EC; Wed, 5 Jul 2023 19:03:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E482BC433C7; Wed, 5 Jul 2023 19:03:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688583806; bh=TY45/qxVQy5GwD4MUK0nAW9hU9YuqFqdo4bjfCKVLWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q5YkT3oKssEYp1IZYAITd8OOV6yhElw19ZJxTOnXqApHyge3ImKYjoVO8TWQXVC7K c7wz+wwOGez5xi0rfzV5yW9ruvCLO1a86FBTYITX2YVrOGLZnpoH0TkpQ7YurobODP bMTyuKQVK1s0qZw7kBgqW4Msb5FnjM3IQp+IISwpBukKE2R6WN4zMwumL77K6gCc72 UvPHm3P6xYVpn7jS6rRwjHfbkX0oXETbH8Gliu+IZOO0lfvgkjFwDnJ9CoijLClhlW ecPkniQJCMr8yRDa5h8zbn2zqJzqzmHC+AezI9URr1qmySlFInP+u9RjTSrQE5jBun I4KkezId9Jn6A== From: Jeff Layton To: Christian Brauner , Konstantin Komarov Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ntfs3@lists.linux.dev Subject: [PATCH v2 13/92] ntfs3: convert to simple_rename_timestamp Date: Wed, 5 Jul 2023 15:00:38 -0400 Message-ID: <20230705190309.579783-11-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230705190309.579783-1-jlayton@kernel.org> References: <20230705185755.579053-1-jlayton@kernel.org> <20230705190309.579783-1-jlayton@kernel.org> MIME-Version: 1.0 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 A rename potentially involves updating 4 different inode timestamps. Convert to the new simple_rename_timestamp helper function. Signed-off-by: Jeff Layton --- fs/ntfs3/namei.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c index 70f8c859e0ad..bfd986699f9e 100644 --- a/fs/ntfs3/namei.c +++ b/fs/ntfs3/namei.c @@ -324,14 +324,11 @@ static int ntfs_rename(struct mnt_idmap *idmap, struct inode *dir, /* Restore after failed rename failed too. */ _ntfs_bad_inode(inode); } else if (!err) { - inode->i_ctime = dir->i_ctime = dir->i_mtime = - current_time(dir); + simple_rename_timestamp(dir, dentry, new_dir, new_dentry); mark_inode_dirty(inode); mark_inode_dirty(dir); - if (dir != new_dir) { - new_dir->i_mtime = new_dir->i_ctime = dir->i_ctime; + if (dir != new_dir) mark_inode_dirty(new_dir); - } if (IS_DIRSYNC(dir)) ntfs_sync_inode(dir); -- 2.41.0