Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3148729rdh; Thu, 28 Sep 2023 04:19:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/yRbUCrVSdEbw7PMGCBuY4scYmqeK+tDwkdpncMLh3BI2Wt7D0njIaIW2WMMMu2lnJJnJ X-Received: by 2002:a17:90b:33c2:b0:274:3d7d:e793 with SMTP id lk2-20020a17090b33c200b002743d7de793mr753918pjb.47.1695899972808; Thu, 28 Sep 2023 04:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695899972; cv=none; d=google.com; s=arc-20160816; b=z+/8t1RYPR6D1uFlGakeFAeFyMr0uKC7Ox+vYCS2Vn4eJnbmWbVfJMjmCqCk0rKCcy idlLJgt8EqlxHnOhIyJKcV5cCRybC+8haGSqcqc6YZetxMA+Med/r6rL5l+NqaBO2QAo MzCTkh/R9fyAcEkunXMqhblkWazYT+mPSB3osGsUtiP4NqHJBCFa34LAGqjavpuS4KOz ItJV1BlN0fRTVQ/wNH0yjI+7XMXE4N6O4EDxzTIOzos/0cRdfIUqHlBZG0QEdU8xnhWi myEw4CNA3z/QePS+NhmZvJjy6nrb/s3T+4QUtDg/t4Mf8b/9hpOlV4+Z8z9RSPyDniRM p/Lw== 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=WnE7FOqTL+S0edSrm4Tj7EhJ4qzKE0CnnUGlwuUxbhU=; fh=0X1+ZWAKENe79Woy9vzy7Fij6FNDnu7TocbHc/JoZg0=; b=Txkge3XbWduzVUGsiDadgEr27jJ3OyJKXOXqobmab35ujSPqdVFAXQQ9c+ppOupbDC JKG2HwWWJS/hwo4eIKacb0gkX/xhfBCmdKzxcYUqtwXah+TNAaR1uGTdUnK5PeLC2tPo g7SvsRAsY2mnpkFQMISkggs3J3GEHOV7c7EBjAdkGkB/EjINpffeDJpWjS0V0AyxU+34 dOAb1AHnfIaY2Zf4L4H3DlVtkrI1UBsqt4ZHDwXr/vdck4UcAoxssVxsWd6jRsTdqiB0 yvgBhcqzZrnp5h0/gc1N+mnQjdRzezwPl7Nv5TQ1g2nL5let9RSYT26Y6S7dcelAC0fK JgDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jFqCDKGa; 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 a8-20020a17090abe0800b00276c28cdd4fsi12780800pjs.31.2023.09.28.04.19.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 04:19:32 -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=jFqCDKGa; 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 1CE6A8026005; Thu, 28 Sep 2023 04:05:41 -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 S232081AbjI1LF3 (ORCPT + 99 others); Thu, 28 Sep 2023 07:05:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232075AbjI1LEe (ORCPT ); Thu, 28 Sep 2023 07:04:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E62EC10D2; Thu, 28 Sep 2023 04:04:29 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00001C433C8; Thu, 28 Sep 2023 11:04:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695899069; bh=gMKvmRXp972OYt1KIoLm1NC/jDCunsGX2jl689W73G4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jFqCDKGarV5U3VWmY4tvVnReKQ3wRK5JN2JTbyffcy75PfIin864DidI3nngnDFmv slLhZDQg1cP7vtJK8LnHhJuVDxFbqBY0jr2x/Xi1PFQon8Il4lYfgXFgd4cznXFjIM Y4v8Z/XGuW7TOfyqDjF38FvFnV9RmnDbcYD2BwD8kq2oVKTMeIUuqsqHxJfZx0prex FlH/ujcDZecDxg1MYOJkrtr5SjkWrhu1lNE7YZHlKH8xGOsMi/uXK71sMoElBPTN7y 7ZEDENfZ90v/Hvkv2x7qvVqiHTLET1G6QuxwVrL+RIiOAevVPjG0MWPFq63ldFiTQh P/QwYx85OUEgQ== From: Jeff Layton To: Alexander Viro , Christian Brauner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christian Schoenebeck , v9fs@lists.linux.dev Subject: [PATCH 15/87] fs/9p: convert to new inode {a,m}time accessors Date: Thu, 28 Sep 2023 07:02:24 -0400 Message-ID: <20230928110413.33032-14-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 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]); Thu, 28 Sep 2023 04:05:41 -0700 (PDT) Signed-off-by: Jeff Layton --- fs/9p/vfs_inode.c | 6 +++--- fs/9p/vfs_inode_dotl.c | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 0d28ecf668d0..b845ee18a80b 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -260,7 +260,7 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses, inode_init_owner(&nop_mnt_idmap, inode, NULL, mode); inode->i_blocks = 0; inode->i_rdev = rdev; - inode->i_atime = inode->i_mtime = inode_set_ctime_current(inode); + simple_inode_init_ts(inode); inode->i_mapping->a_ops = &v9fs_addr_operations; inode->i_private = NULL; @@ -1150,8 +1150,8 @@ v9fs_stat2inode(struct p9_wstat *stat, struct inode *inode, set_nlink(inode, 1); - inode->i_atime.tv_sec = stat->atime; - inode->i_mtime.tv_sec = stat->mtime; + inode_set_atime(inode, stat->atime, 0); + inode_set_mtime(inode, stat->mtime, 0); inode_set_ctime(inode, stat->mtime, 0); inode->i_uid = v9ses->dfltuid; diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index 1312f68965ac..c7319af2f471 100644 --- a/fs/9p/vfs_inode_dotl.c +++ b/fs/9p/vfs_inode_dotl.c @@ -641,10 +641,10 @@ v9fs_stat2inode_dotl(struct p9_stat_dotl *stat, struct inode *inode, struct v9fs_inode *v9inode = V9FS_I(inode); if ((stat->st_result_mask & P9_STATS_BASIC) == P9_STATS_BASIC) { - inode->i_atime.tv_sec = stat->st_atime_sec; - inode->i_atime.tv_nsec = stat->st_atime_nsec; - inode->i_mtime.tv_sec = stat->st_mtime_sec; - inode->i_mtime.tv_nsec = stat->st_mtime_nsec; + inode_set_atime(inode, stat->st_atime_sec, + stat->st_atime_nsec); + inode_set_mtime(inode, stat->st_mtime_sec, + stat->st_mtime_nsec); inode_set_ctime(inode, stat->st_ctime_sec, stat->st_ctime_nsec); inode->i_uid = stat->st_uid; @@ -660,12 +660,12 @@ v9fs_stat2inode_dotl(struct p9_stat_dotl *stat, struct inode *inode, inode->i_blocks = stat->st_blocks; } else { if (stat->st_result_mask & P9_STATS_ATIME) { - inode->i_atime.tv_sec = stat->st_atime_sec; - inode->i_atime.tv_nsec = stat->st_atime_nsec; + inode_set_atime(inode, stat->st_atime_sec, + stat->st_atime_nsec); } if (stat->st_result_mask & P9_STATS_MTIME) { - inode->i_mtime.tv_sec = stat->st_mtime_sec; - inode->i_mtime.tv_nsec = stat->st_mtime_nsec; + inode_set_mtime(inode, stat->st_mtime_sec, + stat->st_mtime_nsec); } if (stat->st_result_mask & P9_STATS_CTIME) { inode_set_ctime(inode, stat->st_ctime_sec, -- 2.41.0