]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: open code timespec64 in struct btrfs_inode
authorDavid Sterba <dsterba@suse.com>
Tue, 19 Aug 2025 03:04:31 +0000 (23:04 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:41 +0000 (16:28 +0200)
commit9c64d6b07cbbc2084c6c42af6d277496bdf62e9c
treec142c8c9d25b2c4f5fe38711fe1691bcf5d18c8d
parent8f85af32692d6ae3cde72145f7f9157cfe2baddd
btrfs: open code timespec64 in struct btrfs_inode

[ Upstream commit c6e8f898f56fae2cb5bc4396bec480f23cd8b066 ]

The type of timespec64::tv_nsec is 'unsigned long', while we have only
u32 for on-disk and in-memory. This wastes a few bytes in btrfs_inode.
Add separate members for sec and nsec with the corresponding type width.
This creates a 4 byte hole in btrfs_inode which can be utilized in the
future.

Signed-off-by: David Sterba <dsterba@suse.com>
Stable-dep-of: 1ef94169db09 ("btrfs: populate otime when logging an inode item")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/btrfs_inode.h
fs/btrfs/delayed-inode.c
fs/btrfs/inode.c