]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fs: add icount_read_once() and stop open-coding ->i_count loads
authorMateusz Guzik <mjguzik@gmail.com>
Tue, 21 Apr 2026 18:25:36 +0000 (20:25 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 11 May 2026 21:12:28 +0000 (23:12 +0200)
commit769e143b115a4af75ecbc6d4e39d58b3e6fe2099
tree0a7f60cf4f5f39aca2505890e0f625abd715dff2
parent254f49634ee16a731174d2ae34bc50bd5f45e731
fs: add icount_read_once() and stop open-coding ->i_count loads

Similarly to inode_state_read_once(), it makes the caller spell out
they acknowledge instability of the returned value.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://patch.msgid.link/20260421182538.1215894-2-mjguzik@gmail.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
14 files changed:
arch/powerpc/platforms/cell/spufs/file.c
fs/btrfs/inode.c
fs/ceph/mds_client.c
fs/ext4/ialloc.c
fs/hpfs/inode.c
fs/inode.c
fs/nfs/inode.c
fs/smb/client/inode.c
fs/ubifs/super.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_trace.h
include/linux/fs.h
include/trace/events/filelock.h
security/landlock/fs.c