Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29459548rwd; Wed, 5 Jul 2023 12:09:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlHx0p6zQyItZdKEaBou5gweHfMi3t4b3OZkQ52qN0xFpDOqWvR29/45pZzajdxKgYTtiO5C X-Received: by 2002:a05:6a20:7f8b:b0:12c:ed6f:c114 with SMTP id d11-20020a056a207f8b00b0012ced6fc114mr22336069pzj.50.1688584149469; Wed, 05 Jul 2023 12:09:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688584149; cv=none; d=google.com; s=arc-20160816; b=0JGGAl5b4GgLHkyKosFkGhu6ZUoPz9NvnPFWtHndrxXakZDur6tEWXt9/uasW++A9o 5FUA+HopRoD8MB5waVeBIVI6dO8KT1BeC1kdlfCXpMYrvJXWwkGJ470nd9WIIogHGppH LZsj8Cln/Lxg0x5Q6ofqNFccHpsiHEyl7pJQ2Q2FN7nqAu4qAk1DeFpHW+gcEXA6v32P PCm1v0R4KSHRuXYURldzI1dNe4QVD80D9kEZ9nxUWa9UnLWVtBz0bkcmChwr7R4sgpGm OKLXDa8VXTVVbzZx3Vb9UQ2Uu7plb8x+WgxNlEDW/9uzqyLL0a2MrZuKt5BxkDA+oYU9 lg1Q== 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=nTdTaIbmvSh8SsRtk1XTCyYftNObtDUPIRBPgePnYDE=; fh=RRVy51jN+A1SuyAuypdIEAgta+T/OkWqV5o26C13jt8=; b=mCxMC8f9Fm/9I1/V7qkAVNaIzrhhZNz90jNNsD6yrFpcsy6HiTgIRvhg6qKeffCSW0 wZ4ctOz3ngoTXXxlyNKVUWnHkI7jBo8wrxyYzVxSTbDO/+5taXLMRUm2gr3HCJYvSLb4 uw4v2QJR2n//txKN5gT6VQrvnYNL3EfdRa02nnurY9QCal5cngwDt9mgBz4rVn4upj8/ AmzSw2wWJTlqk1Lp1Tzp5wfrKd+x066AAC7FsaUwf4szKjm67i6YjMzN7Ej9V6QanUfN qygYIvDmqwlM2ajjm00oa3FPJFWwf071kFFxl7gIUkNfHXOwxMaNPky1KiykIxZOK+bb n7uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kan5Cvx9; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 k25-20020a635a59000000b0054ff8291781si23896111pgm.349.2023.07.05.12.08.54; Wed, 05 Jul 2023 12:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=Kan5Cvx9; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 S233109AbjGETIl (ORCPT + 99 others); Wed, 5 Jul 2023 15:08:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233964AbjGETIK (ORCPT ); Wed, 5 Jul 2023 15:08:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7323F30E9; Wed, 5 Jul 2023 12:04:49 -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 504B7616C4; Wed, 5 Jul 2023 19:04:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B789BC433C9; Wed, 5 Jul 2023 19:04:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688583888; bh=nz4OgBYlsMOKdpSoA1HyBKv/O9jg4R14AE4cRb0Uh3o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kan5Cvx9lHLoy6XyRcibzCs0nKOnNBUGlFOzV8oieR+t/dvFwzCsGh20hoDsdk4uG 5nj1fIEwdvRV/XExVDTHN+tgIYw5xjbi3FNdnAXTzAidMKBG5gb3ZSOlqcAG5ynWW8 6DsZ2QUSoqTrENweGMCX5O6lnAQ3s7MO2oIJbJzXHMDzQe8P9H/NWaX8AFUX0dL7Im vLaSjakV661euyKtWFPx4JWUfFKDcykpk30buOIZmPKjnjPC8FfxMbx4EZm0RdgEM/ xVkXZS9LEUeNTNDr/tEOQSa0Rehaw3Yci6yxUulcbc52vKrvjp9JKzVxpRc7+knZd1 jidF2E09cGkYw== From: Jeff Layton To: Christian Brauner , Chuck Lever , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org Subject: [PATCH v2 58/92] nfsd: convert to ctime accessor functions Date: Wed, 5 Jul 2023 15:01:23 -0400 Message-ID: <20230705190309.579783-56-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-nfs@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. Acked-by: Chuck Lever Signed-off-by: Jeff Layton --- fs/nfsd/nfsctl.c | 2 +- fs/nfsd/vfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 1b8b1aab9a15..a53c5660a8c4 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -1131,7 +1131,7 @@ static struct inode *nfsd_get_inode(struct super_block *sb, umode_t mode) /* Following advice from simple_fill_super documentation: */ inode->i_ino = iunique(sb, NFSD_MaxReserved); 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); switch (mode & S_IFMT) { case S_IFDIR: inode->i_fop = &simple_dir_operations; diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 8a2321d19194..40a68bae88fc 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c @@ -520,7 +520,7 @@ nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, nfsd_sanitize_attrs(inode, iap); - if (check_guard && guardtime != inode->i_ctime.tv_sec) + if (check_guard && guardtime != inode_get_ctime(inode).tv_sec) return nfserr_notsync; /* -- 2.41.0