diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-10-07 23:08:34 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2024-10-19 20:33:34 -0400 |
commit | e896474fe4851ffc4dd860c92daa906783090346 (patch) | |
tree | 190f43b0cad7d3754b88e3f3f3b9d4f365408bc1 /lib/crypto/mpi/mpi-mul.c | |
parent | 5b313bcb6e3597dacd893ae9545fd087df46db45 (diff) | |
download | linux-e896474fe4851ffc4dd860c92daa906783090346.tar.gz linux-e896474fe4851ffc4dd860c92daa906783090346.tar.bz2 linux-e896474fe4851ffc4dd860c92daa906783090346.zip |
getname_maybe_null() - the third variant of pathname copy-in
Semantics used by statx(2) (and later *xattrat(2)): without AT_EMPTY_PATH
it's standard getname() (i.e. ERR_PTR(-ENOENT) on empty string,
ERR_PTR(-EFAULT) on NULL), with AT_EMPTY_PATH both empty string and
NULL are accepted.
Calling conventions: getname_maybe_null(user_pointer, flags) returns
* pointer to struct filename when non-empty string had been
successfully read
* ERR_PTR(...) on error
* NULL if an empty string or NULL pointer had been given
with AT_EMPTY_PATH in the flags argument.
It tries to avoid allocation in the last case; it's not always
able to do so, in which case the temporary struct filename instance
is freed and NULL returned anyway.
Fast path is inlined.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib/crypto/mpi/mpi-mul.c')
0 files changed, 0 insertions, 0 deletions