Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29491519rwd; Wed, 5 Jul 2023 12:39:45 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7ZMWKjwDm3Jm/A6VVIdXUZDI8FrD15F+pi8EjQWLwPdgYd1Cr3irEbkUSU7EyB0h3wESte X-Received: by 2002:a54:4713:0:b0:39e:5892:8539 with SMTP id k19-20020a544713000000b0039e58928539mr16131338oik.9.1688585985680; Wed, 05 Jul 2023 12:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688585985; cv=none; d=google.com; s=arc-20160816; b=ZCii/+IBg9Cj4EXE/EtDGbyeBStS54QT4WBWevwn7s53SUJa4FJH0VuOm0azU5AjHd 6wJf8IYPdsAldKchFRinZa6D3c72QdSSamNWxFAsp/E2FX5nJ444AfY6dgz9tC+K/29l j/aONnHx2VfMUorBRVG5PNUXKm0OtBFEH1xvRpKyKl8FFgRF0kNANgrS2EPwhPRjAZfw Ez+0YeNWsL3C2hN6q6U1ytAc0v5hK05hMB1H27q851+GgQZcjv6zRLCNDPaUfB5i2oZ8 2UYnLj1hgDz1PfXjEiRox6NvQNaDdbWCG96CmakUoxMwBYPmiI/HRFY4AuxkYw75DvGy MJDA== 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=SDK/WArJRve3HeXhfrA4xgTKsXFbIrYJGoVcMqSk8rg=; fh=jr8QhJr2llEgkVy2YoXqJRI9s4gGiY0qzgnqM+uZ9Xw=; b=tRa6O8Tyi5efG4vx3vhAf7v7YeDTyqvrS+1tEagvYEMPTmkPVee5Ytmx1BAg+nX0Db veDPHF5owsbalJCTLPXLFHSadzMHroZC8pISDnL6uawRVdmblRqm8m7h7KS0y8Tvm7gI qzFgJ+IsEqQXAFIzflIAa0gtGL83nklEg4NDwKynE8AD1HCcxvS92mt36GhiBRmrjwep EZiTN5JoPQw689Q/1FwWr+x9yl8IUrSKdqhjnri5um6Xa02qQlojVb9LtAXO1qjpONwM AKtudC5/l1d4iZus6wnbjXJRecIiTBoE9U9MrKFDF7kuaugny3HjEf2fzbh8MULYrkr7 7dQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=C6fBOQcW; 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 j62-20020a638041000000b0055337ca9cefsi24680167pgd.857.2023.07.05.12.39.30; Wed, 05 Jul 2023 12:39:45 -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=C6fBOQcW; 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 S234073AbjGETK7 (ORCPT + 99 others); Wed, 5 Jul 2023 15:10:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233655AbjGETKG (ORCPT ); Wed, 5 Jul 2023 15:10:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7825A26A0; Wed, 5 Jul 2023 12:05:53 -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 2533B616F0; Wed, 5 Jul 2023 19:05:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 132EAC433C7; Wed, 5 Jul 2023 19:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1688583939; bh=fuAcROkTvzWt2oLhwWrBRUVTBdgYfzuMksRnIzfqmIg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C6fBOQcWDc/pi/H95I+kf1JujNXMjelHZVfb8qt4mTiNkNM6c6jDvFKaihRMDr5AG ZbTxTPNng7DHr+2qgsCcMoh1vXTuuBrUh60Kz20uVdmvRFACmim8lw7S/nX74+8Phi JVojm6xelMYsFECol+OmTAfJiVC6IOtTOqRg8StKBa2mUapqgcgeyk0OsG0DiJHMxq F5iUXroxJyxAh6dglCanl133Fy67F9KKjMrbY9vxv4eHozCZojPMr5mF8u78WGKdru zc/SidxREFDoR8sGbx2kwknTcaksqY+qzmc7U7+0UXqNqwFI21TmSKnMuG75Iw5F0i uiuomrNVRF2Hw== From: Jeff Layton To: Christian Brauner , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa Cc: Al Viro , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org Subject: [PATCH v2 86/92] bpf: convert to ctime accessor functions Date: Wed, 5 Jul 2023 15:01:51 -0400 Message-ID: <20230705190309.579783-84-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 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 --- kernel/bpf/inode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index 4174f76133df..99d0625b6c82 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c @@ -118,9 +118,8 @@ static struct inode *bpf_get_inode(struct super_block *sb, return ERR_PTR(-ENOSPC); inode->i_ino = get_next_ino(); - inode->i_atime = current_time(inode); + inode->i_atime = inode_set_ctime_current(inode); inode->i_mtime = inode->i_atime; - inode->i_ctime = inode->i_atime; inode_init_owner(&nop_mnt_idmap, inode, dir, mode); @@ -148,8 +147,7 @@ static void bpf_dentry_finalize(struct dentry *dentry, struct inode *inode, d_instantiate(dentry, inode); dget(dentry); - dir->i_mtime = current_time(dir); - dir->i_ctime = dir->i_mtime; + dir->i_mtime = inode_set_ctime_current(dir); } static int bpf_mkdir(struct mnt_idmap *idmap, struct inode *dir, -- 2.41.0