]> www.infradead.org Git - users/willy/pagecache.git/commit
dcache: back inline names with a struct-wrapped array of unsigned long
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 10 Dec 2024 00:35:36 +0000 (19:35 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 17 Jan 2025 22:46:05 +0000 (17:46 -0500)
commit58cf9c383c5c686668082f83f7e0f3e0bd5cc2e3
tree04c0f374f7db14b5eb5e4c4201c7886adf53ae55
parent61bc24ac974a4873e3040765e640f62fe99d6226
dcache: back inline names with a struct-wrapped array of unsigned long

... so that they can be copied with struct assignment (which generates
better code) and accessed word-by-word.

The type is union shortname_storage; it's a union of arrays of
unsigned char and unsigned long.

struct name_snapshot.inline_name turned into union shortname_storage;
users (all in fs/dcache.c) adjusted.

struct dentry.d_iname has some users outside of fs/dcache.c; to
reduce the amount of noise in commit, it is replaced with
union shortname_storage d_shortname and d_iname is turned into a macro
that expands to d_shortname.string (similar to d_lock handling).
That compat macro is temporary - most of the remaining instances will
be taken out by debugfs series, and once that is merged and few others
are taken care of this will go away.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c
include/linux/dcache.h
tools/testing/selftests/bpf/progs/find_vma.c