From patchwork Wed Jul 5 19:00:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13302757 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DD4AEC001B0 for ; Wed, 5 Jul 2023 19:03:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6466C8D0002; Wed, 5 Jul 2023 15:03:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5CFE18D0001; Wed, 5 Jul 2023 15:03:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 470CC8D0002; Wed, 5 Jul 2023 15:03:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 31FDC8D0001 for ; Wed, 5 Jul 2023 15:03:27 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 057511A0BAA for ; Wed, 5 Jul 2023 19:03:27 +0000 (UTC) X-FDA: 80978481654.15.1334130 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf30.hostedemail.com (Postfix) with ESMTP id 35FAE80019 for ; Wed, 5 Jul 2023 19:03:24 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NJB7XRGZ; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf30.hostedemail.com: domain of jlayton@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=jlayton@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688583805; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=xKAUX1gAiGeMAe4hDD9pQTq1NUzFHWrVLxy+KkYN7Hk=; b=FwP6IsyIdIniEBdk6alXxbuidVmlPcp6GdhPrKEksEJHwgyGmcoRVLwH6Y51dbfVNEm19n w69FCJLT1DBPhXg//ehsEFwTXtCv+rNduKVxuDtCVH+JAD+4I2ddYwglagN0dJpayqtBVP DyVdPKOSUAn3szi7k+V0X3unAHI9kMs= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NJB7XRGZ; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf30.hostedemail.com: domain of jlayton@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=jlayton@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688583805; a=rsa-sha256; cv=none; b=RnsRQbZL+ObIa021TWfrdg68LRMgC8e5alX0wBnsn21laDUxZtetXBCRHFU00e5xeUqwC6 U0+Qa7MoUKt2YtUUojwzi3b/he+CUXwD9PAo9giDa6gw/RlWSPAH/w7XerFxiGnP+I1JB+ 8rXcdix87qVC2EdL2N37ZXvMI2wvkeU= 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 5B99E616D1; Wed, 5 Jul 2023 19:03:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03D32C433C8; Wed, 5 Jul 2023 19:03:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688583803; bh=L6EzW1gN0+SRZxIErz0sW6Tb73or6lNTvn+UvQ+UhLc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NJB7XRGZ9/2aNYHQfjzBlRCDmmvV+Ti6HLP+oIQ9g5KZrdjQjm0y+Jhl8rdVoiCqG yNAQ8W/mgqYsGvz9nBNxe8BJ21A3QMuv0zJQYxL9guo6asboijEkgDeRQSrBfSig/p y3um6RHGyvKy2DmOpaWHlvqNe+TYIVNtPu4I/5h85aojGvgO6+zM0Ewv62AZ5sItYJ BGFhUukmOesc8UyqgAF96u85MDN4IqtfnbWGFTIJ63/U+8my5inkcImSFEKNDrDBdG voaAhfGJLsCJB7IlrDCNOmZcmkHZs+5FZ8A/Dag+FPXM+vt3V1xLIcdts0ws7Ae+oa roSY/5/VnBDgw== From: Jeff Layton To: Christian Brauner , Hugh Dickins , Andrew Morton Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 11/92] shmem: convert to simple_rename_timestamp Date: Wed, 5 Jul 2023 15:00:36 -0400 Message-ID: <20230705190309.579783-9-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 X-Rspamd-Queue-Id: 35FAE80019 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 3rz1xfx7kgs1dj9igyf4acwi8pckfm8x X-HE-Tag: 1688583804-657362 X-HE-Meta: U2FsdGVkX18IxhUPddy9YXdBuuQh+tGwogbjbug+WDTCyawZGhWFN8IxLbyUW5VavY5Kolk6FvPXk733CIxCfwN/6uhD6rLSR2ppIi1d8t03MyBkU0irB4khVJKkremHqy8FJxMl8X0UcMIKlyecVlzV/XfSOlLLIEKbXC3vMzmJcuORqkqX48+hq1mDl/Z4J2I9blEcxhGY43vFpOdeHUezOLv3MOSDnuO9KvFfrdV1O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0grVUNxvNrS9cOT3BiQaOCuRRpzMO30rCz X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: A rename potentially involves updating 4 different inode timestamps. Convert to the new simple_rename_timestamp helper function. Signed-off-by: Jeff Layton Reviewed-by: Jan Kara --- mm/shmem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/shmem.c b/mm/shmem.c index 0f45e72a5ca7..1693134959c5 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3306,9 +3306,7 @@ static int shmem_rename2(struct mnt_idmap *idmap, old_dir->i_size -= BOGO_DIRENT_SIZE; new_dir->i_size += BOGO_DIRENT_SIZE; - old_dir->i_ctime = old_dir->i_mtime = - new_dir->i_ctime = new_dir->i_mtime = - inode->i_ctime = current_time(old_dir); + simple_rename_timestamp(old_dir, old_dentry, new_dir, new_dentry); inode_inc_iversion(old_dir); inode_inc_iversion(new_dir); return 0;