Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29481843rwd; Wed, 5 Jul 2023 12:30:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ70s6UuIL3ubAEXkLCaEJUu7owgzEMfK8w0h22+Mt74iEXsgCmpGQmdjVCnB8u6x1vrNINu X-Received: by 2002:a05:6a20:7487:b0:11f:33da:56ec with SMTP id p7-20020a056a20748700b0011f33da56ecmr19617816pzd.27.1688585402491; Wed, 05 Jul 2023 12:30:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688585402; cv=none; d=google.com; s=arc-20160816; b=IqtMvmtQ06iLTyythMDfWxW++Hvvu7TlBPpCSB/+HirytBgFAyazwUN43OUZ9vS0Uq ezwL59t7pmAka4iU+oHN436E/GFCoGQa0Ra3lla/L50lCYd9ea2b06ayndGqzGxm5oO7 Oxw+ET5+/+xSFAMC7zKiHoxy4m85RKK+sJkwxdAtZVdaHLd2Ne5secv2GpSf79jgiV7a IAVZK+u0x0J8vN63VWx2R3ChaZXUD+5AmUDYOwhLjpRW+mrUuDJ8jzIew0yPLUKqyBoU U/04ety5Xv+Q1rVNpY6SGD5HS1F+BXbiOjSc/4wwM4D114UzSbkP19EjVxIDTtmaxOuy TJwA== 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=PRgH5Rpr8n1m/gtkDgQYS8pwXP0CmmnYkeLa8MeBnE0=; fh=tv+k1PFF3Srrq76KPuWBI9zf2XTO3UcT8YmoCfyDVlg=; b=uYKLbbpgobJFUGxjal6bXd+Q3BPxOfleJdfrpOMZA1GCvYxEsM2iJzp7QLVfeSB7ze uB+sYenIi4m1pHeP10HPuLFW3qLZtkSpvdP5IgRAzCBSCnMsTyy5+1JFfqXNIgJSXubc DgpcuAADwugVwvy5wjP8uZv5tTqzjF//FWhcGcgUuu33GqJtzgzeWnCp0MBOXKC+/vdr bAlZ5jPAbsf1wQUC0pLPaCIlMyGvXwfLEiUlsat+BkUXSAvC1817kY+yTSA9/WPRS6M/ Is8UTsdMTW2XX/U4t3hQwGmsgGFwnSID4l7MrCUMPbh/lAl+WzGRwtJL+cHvv3MFYfaY 7Dvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OZdARDRy; 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 bs188-20020a6328c5000000b0055b28f930a3si16274181pgb.546.2023.07.05.12.29.48; Wed, 05 Jul 2023 12:30:02 -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=OZdARDRy; 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 S233594AbjGETGr (ORCPT + 99 others); Wed, 5 Jul 2023 15:06:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233750AbjGETFv (ORCPT ); Wed, 5 Jul 2023 15:05:51 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 355161BD5; Wed, 5 Jul 2023 12:04:15 -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 BDC02616F0; Wed, 5 Jul 2023 19:04:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BB1EC433C7; Wed, 5 Jul 2023 19:03:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688583840; bh=Yj3Hja39coL+y8AGiASW+H0zrb4hw9veEJV3lRuQS5E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OZdARDRyu9HbK/4xlHu8SAsr9eP5a3ntrvWZg7JjqlkrGjPE61KU+o5xrpt0LTFs2 eaQKPHbnCvFZd4g7qru7U8YXCnny1r/rYg3pYmPcqPDpaoYyCO4mtAeG4rbb/nhUJV 1UiJdf3nVkkrbawqi8CpDeOo+g1PxdYjnMhpiMD1uyMKzyt7I9N9uNVoDCJNdFC7kw vtHid1+P0gTzfyB7gNbwhz93I2jsEAfb7QVI1shoPeDvQ5zIdUF4LET7zGoL+0C41I YUGQ/YUyljDueIkvTRlNOZODRNMkZA0Z3s64YbOjGsHQpcyv7M+HFpPR4fcirsfvCf nqACRgw72eAIQ== From: Jeff Layton To: Christian Brauner , Joel Becker , Christoph Hellwig Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 32/92] configfs: convert to ctime accessor functions Date: Wed, 5 Jul 2023 15:00:57 -0400 Message-ID: <20230705190309.579783-30-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=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 In later patches, we're going to change how the inode's ctime field is used. Switch to using accessor functions instead of raw accesses of inode->i_ctime. Signed-off-by: Jeff Layton --- fs/configfs/inode.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c index 1c15edbe70ff..fbdcb3582926 100644 --- a/fs/configfs/inode.c +++ b/fs/configfs/inode.c @@ -88,8 +88,7 @@ int configfs_setattr(struct mnt_idmap *idmap, struct dentry *dentry, static inline void set_default_inode_attr(struct inode * inode, umode_t mode) { inode->i_mode = mode; - inode->i_atime = inode->i_mtime = - inode->i_ctime = current_time(inode); + inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); } static inline void set_inode_attr(struct inode * inode, struct iattr * iattr) @@ -99,7 +98,7 @@ static inline void set_inode_attr(struct inode * inode, struct iattr * iattr) inode->i_gid = iattr->ia_gid; inode->i_atime = iattr->ia_atime; inode->i_mtime = iattr->ia_mtime; - inode->i_ctime = iattr->ia_ctime; + inode_set_ctime_to_ts(inode, iattr->ia_ctime); } struct inode *configfs_new_inode(umode_t mode, struct configfs_dirent *sd, @@ -172,7 +171,7 @@ struct inode *configfs_create(struct dentry *dentry, umode_t mode) return ERR_PTR(-ENOMEM); p_inode = d_inode(dentry->d_parent); - p_inode->i_mtime = p_inode->i_ctime = current_time(p_inode); + p_inode->i_mtime = inode_set_ctime_current(p_inode); configfs_set_inode_lock_class(sd, inode); return inode; } -- 2.41.0