From patchwork Mon Aug 7 19:38:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13344814 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 EBDEDC04E69 for ; Mon, 7 Aug 2023 19:39:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B8F96B0078; Mon, 7 Aug 2023 15:39:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 668FF6B007D; Mon, 7 Aug 2023 15:39:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4E3656B007E; Mon, 7 Aug 2023 15:39:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 3F6B66B0078 for ; Mon, 7 Aug 2023 15:39:29 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 0A0B6A070B for ; Mon, 7 Aug 2023 19:39:29 +0000 (UTC) X-FDA: 81098322858.22.615DC03 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf29.hostedemail.com (Postfix) with ESMTP id 367AC12000E for ; Mon, 7 Aug 2023 19:39:26 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=jyfZZJ6o; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf29.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=1691437167; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=YCxRPDoHc5l28ZF0D9WR73zHxvxBQdZMPOGpKFcm9WA=; b=ANQAJR6bFtI6GXLYTzw71d2P2KFXgThkUp46DvYjiUbpiGJ+R1QN0h+i/3uXBNkMbra+8V 6Y6QOt+HQ0239P4luQaohJkw5SFb8nr8y0YbFcfaXtE9gH8y3vxDbKaShXteJkisfLMisY 3VKViRHvowBIReobAEFCM2mvTnyKwJI= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=jyfZZJ6o; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf29.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=1691437167; a=rsa-sha256; cv=none; b=OEZa1NY8EkMdV6i9I3uTLTQRrMRNNt6NUBlMO/+poQggDP2X32I91caHmXxgCQTMuUXhFJ L829MiUHTRnd/zWtJQV24mdlR70PTJzPg+HSrivSbV66iXXDggfuzUpM5UPrNHk9AXlJ8v 4a2BW3LHAssaD/kdXGWdK6A46wesTF0= 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 69C9A621DA; Mon, 7 Aug 2023 19:39:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67BFCC433AB; Mon, 7 Aug 2023 19:39:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691437165; bh=GbRbPLOxHLvc3DeuudVIv0R96Xl/KQh1gZUkLNJwaqw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=jyfZZJ6oAnWrzwy6uxMcn981Ztsf8ekdYSTK5OjKoObb52LSWGYUyPDA4kmPqGF1x XgdC141GcDjigpVsye6Z2fRW99llsFTyP+IfOKPAc68VweV9PIYC/Q0X43vg8N2M+z Az61OjrrYIpqnlx5X/KD2MOToWd0+i939PUFYXt+NeipL/xlWufku7jraVtnp1aZIa HYs+6Di3+mpLU5YwTykDK9WTNQJgdVzsmUOkrVgLqaLNB3qJ9kSvdPg+4laJyCR7YJ tK4OeZHA9mQJuWModJc5QFspncoFCluv2eVgDmWS58HE9PCjeO01QWlyOyDs3rvs2t 9FLqopEpWQzeQ== From: Jeff Layton Date: Mon, 07 Aug 2023 15:38:37 -0400 Subject: [PATCH v7 06/13] ubifs: have ubifs_update_time use inode_update_timestamps MIME-Version: 1.0 Message-Id: <20230807-mgctime-v7-6-d1dec143a704@kernel.org> References: <20230807-mgctime-v7-0-d1dec143a704@kernel.org> In-Reply-To: <20230807-mgctime-v7-0-d1dec143a704@kernel.org> To: Alexander Viro , Christian Brauner , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Howells , Marc Dionne , Chris Mason , Josef Bacik , David Sterba , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Tyler Hicks , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Namjae Jeon , Sungjong Seo , Jan Kara , Theodore Ts'o , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , Miklos Szeredi , Bob Peterson , Andreas Gruenbacher , Greg Kroah-Hartman , Tejun Heo , Trond Myklebust , Anna Schumaker , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Mike Marshall , Martin Brandenburg , Luis Chamberlain , Kees Cook , Iurii Zaikin , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Sergey Senozhatsky , Richard Weinberger , Hans de Goede , Hugh Dickins , Andrew Morton , Amir Goldstein , "Darrick J. Wong" , Benjamin Coddington Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, devel@lists.orangefs.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-mtd@lists.infradead.org, linux-mm@kvack.org, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org, Jeff Layton X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=996; i=jlayton@kernel.org; h=from:subject:message-id; bh=GbRbPLOxHLvc3DeuudVIv0R96Xl/KQh1gZUkLNJwaqw=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBk0Ug9wCd8uHf1JTgjFwTpewg5ScLm1k4tTu02Y EC0/mG6MoaJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZNFIPQAKCRAADmhBGVaC Fct1EACdouI5B+JSe5rResZvzr2jp0vI9jztehgsnHaGwZpffA5C0T8Yg38sCZ7YdqkMrSalPu3 w5M7Xcnqdsh4N6Piv9FyxKwRSFhd6L5ltVRVHih3Qrw4CyeqQSC7cF/EoGpJa9WWyMiMRBCPwXS SU4LxtVbYmpo45fMxJtALEzmwSMTQIvU1bzpRV4xXlicR54RmnWjkO1z9jdwOxQ6twX9yCYJWhy +3XrcrBrTeCS8Z8HreMQGrXDkWsGpGOLe30hRm2zRRGLDwDg58GheX7tI3FJuoWyyPSnXy3GZc3 IA0WXjumJsnEmtP0TTId+6zh00veQZd5f1GR1l36s9K0aaYaoM1mZs2JdqnG9u0fTI7XR41ftea t8+T7wkMIFECd37uaZbjycDqk1RHCXJ9ICgFsL1nEAdkbZL+3Amxg7YLPni5Idxrzm1T01riCL8 urj0TVjv0LL8Cu70DTcMmlGNYW6HA78KZAiTzBDyB1/8z1iYpiO1fv++ontB2RmfNWnf88B+/uB dUK97a5CoO8W1Sg3FRMI1RzkPuF6rcuqwIopnsbtQLtxWCgvC+TTGMRmkaMSjYLODUCN/px7EYj 1m1keuzLArUPtUidWiCLHEoBgRNimTN+hBNrZNS9Ycr9H0FD7wiIc3WUf0F2tZ/Zb1UbnIJDvl2 CuiXxVzCtmQDRgA== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 367AC12000E X-Stat-Signature: 7tgit7iime3goa8yjxs95ut6ns4ksp7d X-HE-Tag: 1691437166-884486 X-HE-Meta: U2FsdGVkX19CHolF17kpuHZdtVe/NMO52/BRFq0jrr1Hr31a/sF8Ij7VRQxx1lJlSCGTOk//BQ+3opA4x9dECHkwEhWd/TwPHYWYtr2olT8fAH1Bbm2clXtjr24gIBDwKAhHz8ZHB5wJd1YGnATl1m5KeYSQgyofia3Z8q6dwW+CVlLXNlcsgAA0NJxNnDtvFYczHMhG823zCNKlDoVw2yEcEBWwV/6mKeKRyTjIIwbUkIW8sBMWTEczoKRDfsEcfSGBZYhfF4b2ZmX1KqhhJ91DHe03hjELD5jC80pyHVoONgkKgku+wv2b8JJhkFGw+H9njkIADBNYsAVXd6B38LC9+tRAHUryk9xburGiDDFj3R8MZFSicBOjtdeTRg1IEJ0WD9MQyLjYrkKtPVThh2QkveCcrCiWQZ4SjFq5g7c5pTmHV2BlyyZRZDNxNf4XZyDvnJW4wbslutW498eOwEPXDwSdxVcBpfgw97w44CRj6S0HdFW0nlox2Kqxg8SUAXyoE+wgZGHB4O+t1CzlR07cICREGKKRiSnYD/43+kDz+x9MkzqqLzjjyrtTFUo085Fsl+HcNE0tZ5dxBtJQ0nsCsEDXY8xMdWEXwfstncZj+HvRuEQF3h6dHHl8WtEQB8lnDljy77LTOhecNitnxCVYsPhaHeXFwi1O4f37e8Qy8EfmtkZeefLd3Bkb4LBtVpOR3Ofl2imZkUwqMYsDKm/Z24292lmVwxLOxHJ9gzSLIdbnD3KFHQsb0qDbv8gKfTrkJybKIxpITSc9LWFz4FOSJkzk5afZ7g9nGJbUeweGnECzgmFmrsik6nGayqzVXVpsR/moiamWuFCa3RMOXHf+KOZ+FyPPNUJ4jRSXdkgDZlWsu8wbLf1vGy1r3s/elxgMxyVQYE6Kb+SXMYUjz4PwPKXQ3TQ3O/hm9pHSuov7wK+zCjjcZMIrFDjxbforbL0yxZLXsNL5Lz358Jn 4XA9crpX GJi7MaJ9pfNUijvpwa7dTnTD+fUFgeJn8VAa3cThpWiPRkCZ1gXiaxFhBHl1trs9UQCjVRtls4BDEYeCqg43qC+am2bgvdQI+Kv5fGaM+EZoLLGiatlsOt+lq7aZvx3PRlNoeyUbbEwCmqS0T4yB+pErhfh0o5QN4xq/mFNq0doa03jMRkDeINaNiiKnV//4OXAlSA9kRUQkS36Ix7RChyMONoFualAXfIhaan9H2uwkYVA75ey68Yusb1WdzyTbvuLfZLTjOm44qucHcNKAJQB+kGs2KsWwGq00+5RZbtcDhHdpUCWTs9M3GO3H6Kx8M7T+Co/GXW9y5BBmGs39NITOTHYy1QdjzHoFsMKJi+a/QJfVkQwEcugqJ/KYmQcJZCmj8pTkx3W2P9x4= 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: In later patches, we're going to drop the "now" parameter from the update_time operation. Prepare ubifs for this, by having it use the new inode_update_timestamps helper. Signed-off-by: Jeff Layton Reviewed-by: Jan Kara --- fs/ubifs/file.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index df9086b19cd0..2d0178922e19 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1397,15 +1397,9 @@ int ubifs_update_time(struct inode *inode, struct timespec64 *time, return err; mutex_lock(&ui->ui_mutex); - if (flags & S_ATIME) - inode->i_atime = *time; - if (flags & S_CTIME) - inode_set_ctime_to_ts(inode, *time); - if (flags & S_MTIME) - inode->i_mtime = *time; - - release = ui->dirty; + inode_update_timestamps(inode, flags); __mark_inode_dirty(inode, I_DIRTY_SYNC); + release = ui->dirty; mutex_unlock(&ui->ui_mutex); if (release) ubifs_release_budget(c, &req);