]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
allow to use CLASS() for struct filename *
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 31 Oct 2025 17:16:03 +0000 (13:16 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 13 Jan 2026 20:15:47 +0000 (15:15 -0500)
commit24df85ffb9712cd6060588f6e08defcda5986efe
tree71252c4690eaf3cedbbd1a782b41304b9f671830
parent12b5bc2a0d337d31d681682401d624338e168bcd
allow to use CLASS() for struct filename *

Not all users match that model, but most of them do.  By the end of
the series we'll be left with very few irregular ones...

Added:
CLASS(filename, name)(user_path) =>
getname(user_path)
CLASS(filename_kernel, name)(string) =>
getname_kernel(string)
CLASS(filename_flags, name)(user_path, flags) =>
getname_flags(user_path, flags)
CLASS(filename_uflags, name)(user_path, flags) =>
getname_uflags(user_path, flags)
CLASS(filename_maybe_null, name)(user_path, flags) =>
getname_maybe_null(user_path, flags)
all with putname() as destructor.

"flags" in filename_flags is in LOOKUP_... space, only LOOKUP_EMPTY matters.
"flags" in filename_uflags and filename_maybe_null is in AT_...... space,
and only AT_EMPTY_PATH matters.

filename_flags conventions might be worth reconsidering later (it might or
might not be better off with boolean instead)

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/fs.h