Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3178987rdh; Thu, 28 Sep 2023 05:12:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvuf+YBXQmmyVpnODdHIVGS3dmCi2xcS8cRFWvoe00a9E/nDiuow57ViDqL7CHtVjpCNom X-Received: by 2002:a17:902:c24d:b0:1c5:6691:4978 with SMTP id 13-20020a170902c24d00b001c566914978mr937095plg.37.1695903173916; Thu, 28 Sep 2023 05:12:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695903173; cv=none; d=google.com; s=arc-20160816; b=sKvuAhDbenJcmncrXDAUmMFodKRExE3eUIQYwSnt7Bpyw2tIkcb6FBGjAQMQeDxe1r RSTFwJ1cE3ocUx1o/mENzbxWx3edvan7+bYL38rc0GTgIKzmNCZ0wRikF3rVRWo0FLEZ UmkwQ7lFgWSFY2YlC2seBDsaabVK8RkPOK8Ces0ed56mW9Sngpne39DLXeg/Nr6ONZGQ LJegLIcQZcfNKM5OqSBkwbFhBcMgXn0YD1ur/oyCu+JY01ENL+xLBQyUIAM+cgMNlRnJ unt47N0EafMNN7Bifv7bAtIPfe/g21Jo/ZtcGtLSyvVBgRRkYOTzarxBcPASTPhW0yxb +mog== 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=i6LyvgRznKC2BbTiPDq2r4dOHdUwnv2IXXkWq4qdJ4E=; fh=oiowXySz2F+J4jdl2t70kJesSvr0fL+txr5uWibwDGw=; b=m7HUqqrIM+7vhn0jN7eWXY1m029SY5B16QUtb02B92lwEWIJVXc6AkRYJKb1Y3yW/T RKlr6eA7xs/v5NTezEHRdygxoBtHOVd9MVKbMHXpKkRXF6XU3cyr0PRbTqG5b31zznTp Gx1noJd8EMo6Br443PDyG0DQVaIw7jAjsPMTzT66DnZV2jbQ5BiTqlRDcTLheQlpA+2J TLFZ8TjoHlnkWUxeKJwfQiPXMyJTHaumFN8zvG9tCyY0uYMyoYE/1UVB+qeLiue/N6ID 6EEc5BFKGwM4NPlkwLd7IrznGXAr0uEXgE2QuMHPNPg8/bebgsSI6wEZlhxzMeXdYZuY zgvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tjVSq0VZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id o16-20020a170902d4d000b001b81a112f9bsi1347149plg.586.2023.09.28.05.12.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 05:12:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tjVSq0VZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C0DDE822CB03; Thu, 28 Sep 2023 04:24:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231922AbjI1LXs (ORCPT + 99 others); Thu, 28 Sep 2023 07:23:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232252AbjI1LXd (ORCPT ); Thu, 28 Sep 2023 07:23:33 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1DB719A1; Thu, 28 Sep 2023 04:05:53 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E2E7C433C7; Thu, 28 Sep 2023 11:05:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695899152; bh=C22B2g/SgAvtHDu6LBtQOcUovQ/o8sJV/B6h/lwEOZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tjVSq0VZ9ZixOCI2LTExv2W1XKrvAXkOB2Akc8mYQZ0QsZj6zFfAFu4f44fI5smx2 qVmZec5FxZblIMmCz0iirOtVMnDEslnixfZ83anyEbHDpve/zrwAIzyUu4DErJXVf6 cNU+yQv2tiT7PgwOKjcBQzsKqOmdjqP+sgm41tk7Usx26UlA6L4oczEmiAlJN94efa yFEuaF9fh9J3LFmffxpG35OtWDN/lVsY7/YgAOitiB9DdYYHwWCIxpMjxkxooBTS0r GgIxU1tFqix6FO+0RxpUrmDN2p7k4Y2C6M3oSEwGwc4TyF09qfkEe4TLwFTfvgdR63 rhHX3YTFl4VCQ== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org Subject: [PATCH 82/87] security/apparmor: convert to new inode {a,m}time accessors Date: Thu, 28 Sep 2023 07:03:31 -0400 Message-ID: <20230928110413.33032-81-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230928110413.33032-1-jlayton@kernel.org> References: <20230928110300.32891-1-jlayton@kernel.org> <20230928110413.33032-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 28 Sep 2023 04:24:15 -0700 (PDT) X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Signed-off-by: Jeff Layton --- security/apparmor/apparmorfs.c | 7 ++++--- security/apparmor/policy_unpack.c | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c index bd6a910f6528..53a0070ff5df 100644 --- a/security/apparmor/apparmorfs.c +++ b/security/apparmor/apparmorfs.c @@ -226,7 +226,7 @@ static int __aafs_setup_d_inode(struct inode *dir, struct dentry *dentry, inode->i_ino = get_next_ino(); inode->i_mode = mode; - inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); inode->i_private = data; if (S_ISDIR(mode)) { inode->i_op = iops ? iops : &simple_dir_inode_operations; @@ -1557,7 +1557,8 @@ void __aafs_profile_migrate_dents(struct aa_profile *old, if (new->dents[i]) { struct inode *inode = d_inode(new->dents[i]); - inode->i_mtime = inode_set_ctime_current(inode); + inode_set_mtime_to_ts(inode, + inode_set_ctime_current(inode)); } old->dents[i] = NULL; } @@ -2543,7 +2544,7 @@ static int aa_mk_null_file(struct dentry *parent) inode->i_ino = get_next_ino(); inode->i_mode = S_IFCHR | S_IRUGO | S_IWUGO; - inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); init_special_inode(inode, S_IFCHR | S_IRUGO | S_IWUGO, MKDEV(MEM_MAJOR, 3)); d_instantiate(dentry, inode); diff --git a/security/apparmor/policy_unpack.c b/security/apparmor/policy_unpack.c index 8b8846073e14..913ec8d0eb63 100644 --- a/security/apparmor/policy_unpack.c +++ b/security/apparmor/policy_unpack.c @@ -89,10 +89,10 @@ void __aa_loaddata_update(struct aa_loaddata *data, long revision) struct inode *inode; inode = d_inode(data->dents[AAFS_LOADDATA_DIR]); - inode->i_mtime = inode_set_ctime_current(inode); + inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode)); inode = d_inode(data->dents[AAFS_LOADDATA_REVISION]); - inode->i_mtime = inode_set_ctime_current(inode); + inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode)); } } -- 2.41.0