From patchwork Wed Oct 4 18:55:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13409303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD54EE7C4EE for ; Wed, 4 Oct 2023 18:55:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 39F528D00A9; Wed, 4 Oct 2023 14:55:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 328D58D0002; Wed, 4 Oct 2023 14:55:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0DF218D00A9; Wed, 4 Oct 2023 14:55:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id EB22F8D0002 for ; Wed, 4 Oct 2023 14:55:52 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id C017D80403 for ; Wed, 4 Oct 2023 18:55:52 +0000 (UTC) X-FDA: 81308683344.09.01965EB Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf23.hostedemail.com (Postfix) with ESMTP id 70110140018 for ; Wed, 4 Oct 2023 18:55:50 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=U4cHhSwb; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of jlayton@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=jlayton@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1696445751; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=DqCEz/v1NIFQEdA9M9suOzM+orY90TuUbymMwTjHgsE=; b=8a1qp6gv/Av5UQXLfU2KH3GMP6zduJcK9/JzcRcJCS3vIctuNOtbLQ++WnJ0nHbDdau1ht 4UWdNxupdzwTQl9RL9qKIHUKomGtbRRTUJxIyovgocYx6le4mzzx4uuIcCJ0J31NVx8xZ3 SKKADmBHJgVS7Rg4SZD5XKF5PsdHKr0= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=U4cHhSwb; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf23.hostedemail.com: domain of jlayton@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=jlayton@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1696445751; a=rsa-sha256; cv=none; b=anRfFfbhBXO7ItzY2uq4nnD//FBO1EZOhC//6A3qlQgaRujvGpSgkApyNrp/0ViGjLkitV Ye9bcoQ20SEe0uOCXeanFNzc52J1O4Sn4HJuIw0nag+e9QHt6lY9Bme4wGz0xKRahzK5XC vrSgjI9fXMY3E1lQNJUGr6SAdUnOHLE= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 93066CE1E77; Wed, 4 Oct 2023 18:55:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BD6BC433C9; Wed, 4 Oct 2023 18:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696445746; bh=g/yzBkH2Lp29tPfDBqNp+9Elc+zqCeoJYNIVCamPD2Q=; h=From:To:Cc:Subject:Date:From; b=U4cHhSwb0LbjLA0qPOmmG7XGfwhLrdUKNdOP6jb0JmroYvkDlGxxFYbdBHNbhzXNH iovfoJxTxBNF3fgWoxKD5rhfozOY+7XT8L1cOwcimaEFAuQea9kFSm7ljzuINveJng 8O/TRaYWLsMFAu0WZqR+Ej7+BaviQVOBsP8mffc2SqReX6OXjtiZTmCmLoR9/saHwB c5rjkuCRPMb/Q55YD3oJLDC2dFLpMza5Y6vaUnEAxOls8VOQTB4gdTGSQ3fEJfeL1x KMOBQbkmXFBlyX1vgIb23wb+t56+wSAOGwpJ/lOlOTTFlZfD0AdwHSMDPWo5mfkyr4 HgGj4IVfBzhTQ== From: Jeff Layton To: Alexander Viro , Christian Brauner , Linus Torvalds , David Sterba , Amir Goldstein , Theodore Ts'o , Eric Biederman , Kees Cook , Jeremy Kerr , Arnd Bergmann , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Greg Kroah-Hartman , =?utf-8?q?Arve_Hj=C3=B8nne?= =?utf-8?q?v=C3=A5g?= , Todd Kjos , Martijn Coenen , Joel Fernandes , Carlos Llamas , Suren Baghdasaryan , Mattia Dongili , Dennis Dalessandro , Jason Gunthorpe , Leon Romanovsky , Brad Warrum , Ritu Agarwal , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Mark Gross , Jiri Slaby , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Sterba , David Howells , Marc Dionne , Ian Kent , Luis de Bethencourt , Salah Triki , "Tigran A. Aivazian" , Chris Mason , Josef Bacik , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Joel Becker , Christoph Hellwig , Nicolas Pitre , "Rafael J. Wysocki" , Ard Biesheuvel , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Namjae Jeon , Sungjong Seo , Jan Kara , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , Christoph Hellwig , Miklos Szeredi , Bob Peterson , Andreas Gruenbacher , Richard Weinberger , Anton Ivanov , Johannes Berg , Mikulas Patocka , Mike Kravetz , Muchun Song , Jan Kara , David Woodhouse , Dave Kleikamp , Tejun Heo , Trond Myklebust , Anna Schumaker , Chuck Lever , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , Ryusuke Konishi , Anton Altaparmakov , Konstantin Komarov , Mark Fasheh , Joseph Qi , Bob Copeland , Mike Marshall , Martin Brandenburg , Luis Chamberlain , Iurii Zaikin , Tony Luck , "Guilherme G. Piccoli" , Anders Larsen , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Sergey Senozhatsky , Phillip Lougher , Steven Rostedt , Masami Hiramatsu , Evgeniy Dushistov , Chandan Babu R , "Darrick J. Wong" , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Hugh Dickins , Andrew Morton , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Stephen Smalley , Eric Paris , Kent Overstreet , Brian Foster Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-rdma@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, v9fs@lists.linux.dev, linux-afs@lists.infradead.org, autofs@vger.kernel.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, linux-efi@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, gfs2@lists.linux.dev, linux-um@lists.infradead.org, linux-mtd@lists.infradead.org, jfs-discussion@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, linux-karma-devel@lists.sourceforge.net, devel@lists.orangefs.org, linux-unionfs@vger.kernel.org, linux-hardening@vger.kernel.org, reiserfs-devel@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-trace-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, bpf@vger.kernel.org, netdev@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-bcachefs@vger.kernel.org Subject: [PATCH v2 87/89] fs: rename inode i_atime and i_mtime fields Date: Wed, 4 Oct 2023 14:55:28 -0400 Message-ID: <20231004185530.82088-1-jlayton@kernel.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: 70110140018 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: d9kjigpyi4ch3qk3den4nddzi6wgpcri X-HE-Tag: 1696445750-355955 X-HE-Meta: U2FsdGVkX1+1I/Pb002qQiiAyY22/4gANnsXuvXs9RBiF9EJcc8gXar3ZuMBEiKLYMTpvOwYQ4Tbk4ow3chR5tgk+7aouVEEnmayyicv2DDX+HTWmkv9dn2GUJFDwjKK5PL3aCpvNPraVzIpgXVPrTHRI9YzXz/1Ux4Hzp4cl4P42RC6DQZKhmyLAs9pNuH/L1LM86rhXnJTPIn6ZkxLI1RDPxLgn5/NNDNBQkOLnC0X5CaGwPbtEAfduPUnakccx92UXslKpyxQhhFoHp7PkUaq0yMNyfJpIVbyFsLP1y4JZDPfh/ICwsDk/i2ij0VL3dGwWCLIFRhBGgHaDRovEcwHIue4QMTFxjY9c/j1etoWtoaR64u9UOGfebEz222dKeIJBcNYXc/C2AjqgqbfVjmQSTIPEaqhYBYKZfMQZaWkzDeowQT90pHL/W1wrkOhCXruqN67OSKhwiZMVYmkw702oKA1oPsib+KmQeZm0U+lMXuoY15ON0H77gfuduvqrs+FI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G1pdvOwow63ux4odLrTJ3Al/EFBfr2DpaDWv8O8w3KHpVSFpExE0/9SIo31g9ZgIolJqbQ9KGipS7uIa6reN0j/w1DyLrfa3a5pvRs+QlpniB2GVwUIB3dpE9E9tiQopWfSI7he9oRq2jHknY2VEWjMuiRfgEkHsInEP4qjfDyMmuu3sR3/H9yvoz6/TTAR9RYcEBxQ6ub2WKGcJ7rd1+Te22jSbhTTaFJxqea PZmxbSU8 Z+KI47Jy96ZosdosTbrBahKxu5eFmvUjznkbj4RBS6ud+KxYY4AhHe5RX13X80FUp/yRmjUtdrC8DE4caQohMGZKsniJILPB2RCYlczacWAyxS+3FXAMB3BJJiqhEhsDrrLfb4DdDNDbezuHnWuABa8zG3RZPs1zpynNP/xwZAIEQINzQqvwa637BXbLFyox3xZUyryBGmIB/1gsFtyRC5FpVDEfjqDHCLLessqP+6pflHRfbG2do9q3ENN+gj4YpOBuUwi4XYNs30fA3ODFhgtuCgMMq4tZ0+KlMm9LeV1jxx2082m5x7npL5HZFtoouPcsdlAcmJoMgFKpKOCYlGZJRR0xYeXrW1+wGfo5hApNiWwKQYUwwuqA4w8orVIKVUPh9EY4QRAVzL/SCN8Jlr X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Rename these two fields to discourage direct access (and to help ensure that we mop up any leftover direct accesses). Signed-off-by: Jeff Layton --- include/linux/fs.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 3ca610d42176..84fdaf399fbe 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -671,8 +671,8 @@ struct inode { }; dev_t i_rdev; loff_t i_size; - struct timespec64 i_atime; - struct timespec64 i_mtime; + struct timespec64 __i_atime; + struct timespec64 __i_mtime; struct timespec64 __i_ctime; /* use inode_*_ctime accessors! */ spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ unsigned short i_bytes; @@ -1517,23 +1517,23 @@ struct timespec64 inode_set_ctime_current(struct inode *inode); static inline time64_t inode_get_atime_sec(const struct inode *inode) { - return inode->i_atime.tv_sec; + return inode->__i_atime.tv_sec; } static inline long inode_get_atime_nsec(const struct inode *inode) { - return inode->i_atime.tv_nsec; + return inode->__i_atime.tv_nsec; } static inline struct timespec64 inode_get_atime(const struct inode *inode) { - return inode->i_atime; + return inode->__i_atime; } static inline struct timespec64 inode_set_atime_to_ts(struct inode *inode, struct timespec64 ts) { - inode->i_atime = ts; + inode->__i_atime = ts; return ts; } @@ -1547,23 +1547,23 @@ static inline struct timespec64 inode_set_atime(struct inode *inode, static inline time64_t inode_get_mtime_sec(const struct inode *inode) { - return inode->i_mtime.tv_sec; + return inode->__i_mtime.tv_sec; } static inline long inode_get_mtime_nsec(const struct inode *inode) { - return inode->i_mtime.tv_nsec; + return inode->__i_mtime.tv_nsec; } static inline struct timespec64 inode_get_mtime(const struct inode *inode) { - return inode->i_mtime; + return inode->__i_mtime; } static inline struct timespec64 inode_set_mtime_to_ts(struct inode *inode, struct timespec64 ts) { - inode->i_mtime = ts; + inode->__i_mtime = ts; return ts; }