Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2807767rdb; Wed, 4 Oct 2023 12:02:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErC264ncgfIWDLisjNtK2lCQkiu9iG87tk/+8Q3X3O/g2p2IGh2hO3RJkY4f5lFH++wFWU X-Received: by 2002:a17:902:8b8c:b0:1c3:2532:ac71 with SMTP id ay12-20020a1709028b8c00b001c32532ac71mr2950647plb.31.1696446124278; Wed, 04 Oct 2023 12:02:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696446124; cv=none; d=google.com; s=arc-20160816; b=nuovGXVj7igImD/yBA3IyKqOLhqSG+SfL35pU9+WN9TcWpn6QqvcDUTcbBlueW++IO Un3eV0T+7dmwbj5UQgSgIv5T5XaJOGG0JRE5CAzlyQWreZUyNVl5Uh3WGeDQy3aKykpl gTwfm6CKOO5A22zJ2z/YFNMMb20YMd80b6nQlMBtS8dNUSbrmeX6J5VCZMr8iYCSFbW6 /CIO0yD9thoySLlElu0YWx9+RzQHMt2pJUb7HUnzcvAqRwfK1OTjKegvkwda1v20F7Ol KOd/LzZNt5/M8SxLShTOGAJJhTYI0k3lSC2EIJZBm/ueeAaDbsPuNPM9SibeotChS69X CnWw== 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:to:from :dkim-signature; bh=r3dc2nRw6jMMvLMCQ2OvZPU+n2DDHi5snYupHQJCgxE=; fh=c1hve9LK7bidUltaxotdOOkNtWZ8Drk/KOyPdUWU/OI=; b=uma2DLEFvQzyFaxnROSbcSIgk6anD6N8TpqJX+Tr1PKqFNseEwyUAc+oVy1X+jZnJc h/pw8GC9NXKnfTSWoYcr5HyYhpq8KDmc4fbEcEopzPQlnrZj82Phr9yoIIHqMIzbPOrx 1v/dbSGgW1msy3CnKysAJ/8tLmsabNWV2sC7Y6ATssw4p/h6y83tDGwjfq0+UWNob/FH PqM20q7BMiTseAw4SPjLE5kJGJgPXhQ2keRwFONKpVOjn8tXva26zdNT3j24sZ6Q9fn6 8IE/zWUQMR5Sha0gLj4HO0TgaWfPBhrepQBnh+hdb4ya4o+x+1pFWJgr+w3rojP65d8A sf6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Ismg/J/W"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id lc6-20020a170902fa8600b001c5616520cfsi3969633plb.204.2023.10.04.12.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 12:02:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Ismg/J/W"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id B96DE80ACFDC; Wed, 4 Oct 2023 12:01:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245314AbjJDTA6 (ORCPT + 99 others); Wed, 4 Oct 2023 15:00:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244936AbjJDS7D (ORCPT ); Wed, 4 Oct 2023 14:59:03 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E762610C6; Wed, 4 Oct 2023 11:55:17 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04C18C433CC; Wed, 4 Oct 2023 18:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445717; bh=78x5FOKJ4pJ0GRw5ASlWg2VLmVN1uACyyEUJyyEHhFs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ismg/J/W8acoWAloIwD82D6YteudQRf4/7EhDQ4uEWHSKRwD4FipLrvKsh6j3jLMc Ycgn3Sd2pdb1/LCLz+2Cqv9DE2eLWZgNklc6j90ZYhLP7zy7t6lvt02CMOSSuJtTcE 3XKTbix/LUmHjfBbn9NUG/6D2JFcBXk2pPgf0KX0uEs4X4HMgGRnUkF5H8DpN9wIKN 98mS3ERLgq7XN6LDG8VVtpqZbslfitcjKo/JjzIlRauBm1iBLXPvRTxQ2iEy8zM+aP eSszRaUhnanJMRDs7E9koFxiRdvzowWxcoy8vFFg0T8BmP6/gJ2bQ9mYqt2SMNlhOa UJZ7niAeAhduQ== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 76/89] vboxsf: convert to new timestamp accessors Date: Wed, 4 Oct 2023 14:53:01 -0400 Message-ID: <20231004185347.80880-74-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231004185347.80880-1-jlayton@kernel.org> References: <20231004185221.80802-1-jlayton@kernel.org> <20231004185347.80880-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 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 04 Oct 2023 12:01:16 -0700 (PDT) Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton --- fs/vboxsf/utils.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/fs/vboxsf/utils.c b/fs/vboxsf/utils.c index 83f20dd15522..72ac9320e6a3 100644 --- a/fs/vboxsf/utils.c +++ b/fs/vboxsf/utils.c @@ -126,12 +126,12 @@ int vboxsf_init_inode(struct vboxsf_sbi *sbi, struct inode *inode, do_div(allocated, 512); inode->i_blocks = allocated; - inode->i_atime = ns_to_timespec64( - info->access_time.ns_relative_to_unix_epoch); + inode_set_atime_to_ts(inode, + ns_to_timespec64(info->access_time.ns_relative_to_unix_epoch)); inode_set_ctime_to_ts(inode, ns_to_timespec64(info->change_time.ns_relative_to_unix_epoch)); - inode->i_mtime = ns_to_timespec64( - info->modification_time.ns_relative_to_unix_epoch); + inode_set_mtime_to_ts(inode, + ns_to_timespec64(info->modification_time.ns_relative_to_unix_epoch)); return 0; } @@ -194,7 +194,7 @@ int vboxsf_inode_revalidate(struct dentry *dentry) struct vboxsf_sbi *sbi; struct vboxsf_inode *sf_i; struct shfl_fsobjinfo info; - struct timespec64 prev_mtime; + struct timespec64 mtime, prev_mtime; struct inode *inode; int err; @@ -202,7 +202,7 @@ int vboxsf_inode_revalidate(struct dentry *dentry) return -EINVAL; inode = d_inode(dentry); - prev_mtime = inode->i_mtime; + prev_mtime = inode_get_mtime(inode); sf_i = VBOXSF_I(inode); sbi = VBOXSF_SBI(dentry->d_sb); if (!sf_i->force_restat) { @@ -225,7 +225,8 @@ int vboxsf_inode_revalidate(struct dentry *dentry) * page-cache for it. Note this also gets triggered by our own writes, * this is unavoidable. */ - if (timespec64_compare(&inode->i_mtime, &prev_mtime) > 0) + mtime = inode_get_mtime(inode); + if (timespec64_compare(&mtime, &prev_mtime) > 0) invalidate_inode_pages2(inode->i_mapping); return 0; -- 2.41.0