linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 85/87] fs: rename i_atime and i_mtime fields to __i_atime and __i_mtime
@ 2023-09-28 11:05 Jeff Layton
  2023-09-28 11:05 ` [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers Jeff Layton
  2023-09-28 11:05 ` [PATCH 87/87] fs: move i_blocks up a few places in struct inode Jeff Layton
  0 siblings, 2 replies; 24+ messages in thread
From: Jeff Layton @ 2023-09-28 11:05 UTC (permalink / raw)
  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, Arve Hjønnevåg, 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,
	Ilpo Järvinen, 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,
	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
  Cc: linux-fsdevel, linux-kernel, linux-mm, linuxppc-dev, linux-s390,
	platform-driver-x86, linux-rdma, linux-serial, linux-usb, v9fs,
	linux-afs, autofs, linux-btrfs, ceph-devel, codalist, linux-efi,
	linux-erofs, linux-ext4, linux-f2fs-devel, gfs2, linux-um,
	linux-mtd, jfs-discussion, linux-nfs, linux-nilfs, linux-ntfs-dev,
	ntfs3, ocfs2-devel, linux-karma-devel, devel, linux-unionfs,
	linux-hardening, reiserfs-devel, linux-cifs, samba-technical,
	linux-trace-kernel, linux-xfs, bpf, netdev, apparmor,
	linux-security-module, selinux

Make it clear that these fields are private now, and that the accessors
should be used instead.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 include/linux/fs.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 12d247b82aa0..831657011036 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -671,9 +671,9 @@ struct inode {
 	};
 	dev_t			i_rdev;
 	loff_t			i_size;
-	struct timespec64	i_atime;
-	struct timespec64	i_mtime;
-	struct timespec64	__i_ctime; /* use inode_*_ctime accessors! */
+	struct timespec64	__i_atime; /* use inode_*_atime accessors */
+	struct timespec64	__i_mtime; /* use inode_*_mtime accessors */
+	struct timespec64	__i_ctime; /* use inode_*_ctime accessors */
 	spinlock_t		i_lock;	/* i_blocks, i_bytes, maybe i_size */
 	unsigned short          i_bytes;
 	u8			i_blkbits;
@@ -1555,13 +1555,13 @@ static inline struct timespec64 inode_set_ctime(struct inode *inode,
 
 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;
 }
 
@@ -1575,13 +1575,13 @@ static inline struct timespec64 inode_set_atime(struct inode *inode,
 
 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;
 }
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2023-10-01  5:39 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-28 11:05 [PATCH 85/87] fs: rename i_atime and i_mtime fields to __i_atime and __i_mtime Jeff Layton
2023-09-28 11:05 ` [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers Jeff Layton
2023-09-28 15:48   ` Arnd Bergmann
2023-09-28 17:06     ` Jeff Layton
2023-09-28 17:19       ` Darrick J. Wong
2023-09-28 17:40         ` Jeff Layton
2023-09-28 20:21           ` Arnd Bergmann
2023-09-28 21:26           ` Theodore Ts'o
2023-09-29  0:18             ` Linus Torvalds
2023-09-29  3:50               ` Amir Goldstein
2023-09-29 16:22                 ` Linus Torvalds
2023-09-29  3:27         ` Amir Goldstein
2023-09-29  6:32         ` David Howells
2023-09-30 14:50           ` Steve French
2023-10-01  5:01             ` [OT] " Gabriel Paubert
2023-09-29  9:44       ` Christian Brauner
2023-09-29 10:16         ` Jeff Layton
2023-09-28 17:09   ` Jeff Layton
2023-09-28 11:05 ` [PATCH 87/87] fs: move i_blocks up a few places in struct inode Jeff Layton
2023-09-28 11:35   ` Amir Goldstein
2023-09-28 12:01     ` Jeff Layton
2023-09-28 17:41   ` Linus Torvalds
2023-09-28 18:01     ` Jeff Layton
2023-09-29  9:32     ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).