mbox series

[0/3] whack user_path_at_empty, cleanup getname_flags

Message ID 20240604155257.109500-1-mjguzik@gmail.com (mailing list archive)
Headers show
Series whack user_path_at_empty, cleanup getname_flags | expand

Message

Mateusz Guzik June 4, 2024, 3:52 p.m. UTC
I tried to take a stab at the atomic filename refcount thing [1], found
some easy cleanup to do as a soft prerequisite.

user_path_at_empty saddles getname_flags with an int * argument nobody
else uses, so it only results in everyone else having to pass NULL
there. This is trivially avoidable.

Should a need for user_path_at_empty it can probably be implemented in a
nicer manner than it was.

1: https://lore.kernel.org/linux-fsdevel/20240604132448.101183-1-mjguzik@gmail.com/T/#u

Mateusz Guzik (3):
  vfs: stop using user_path_at_empty in do_readlinkat
  vfs: retire user_path_at_empty and drop empty arg from getname_flags
  vfs: shave a branch in getname_flags

 fs/fsopen.c           |  2 +-
 fs/namei.c            | 41 +++++++++++++++++++------------------
 fs/stat.c             | 47 ++++++++++++++++++++++++-------------------
 include/linux/fs.h    |  2 +-
 include/linux/namei.h |  8 +-------
 io_uring/statx.c      |  3 +--
 io_uring/xattr.c      |  4 ++--
 7 files changed, 53 insertions(+), 54 deletions(-)

Comments

Christian Brauner June 5, 2024, 3:10 p.m. UTC | #1
On Tue, 04 Jun 2024 17:52:54 +0200, Mateusz Guzik wrote:
> I tried to take a stab at the atomic filename refcount thing [1], found
> some easy cleanup to do as a soft prerequisite.
> 
> user_path_at_empty saddles getname_flags with an int * argument nobody
> else uses, so it only results in everyone else having to pass NULL
> there. This is trivially avoidable.
> 
> [...]

Snatched with some minor changes unless I hear complaints.

---

Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc

[1/3] vfs: stop using user_path_at_empty in do_readlinkat
      https://git.kernel.org/vfs/vfs/c/d63b3a67520b
[2/3] vfs: retire user_path_at_empty and drop empty arg from getname_flags
      https://git.kernel.org/vfs/vfs/c/a01c264715dc
[3/3] vfs: shave a branch in getname_flags
      https://git.kernel.org/vfs/vfs/c/12a8c8f491b4