]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
do_fchmodat(): import pathname only once
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 1 Nov 2025 04:48:31 +0000 (00:48 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 13 Jan 2026 20:16:44 +0000 (15:16 -0500)
commit67591df968f4ceb12c1f5d7f9caebc668200856b
tree9e6763814d30247af9c8d492725c6a844d0d9f3c
parent0cf1149673da1153d32eeea67771a002530fda42
do_fchmodat(): import pathname only once

Convert the user_path_at() call inside a retry loop into getname_flags() +
filename_lookup() + putname() and leave only filename_lookup() inside
the loop.

Since we have the default logics for use of LOOKUP_EMPTY (passed iff
AT_EMPTY_PATH is present in flags), just use getname_uflags() and
don't bother with setting LOOKUP_EMPTY in lookup_flags - getname_uflags()
will pass the right thing to getname_flags() and filename_lookup()
doesn't care about LOOKUP_EMPTY at all.

The things could be further simplified by use of cleanup.h stuff, but
let's not clutter the patch with that.

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